Custom Label in Power BI – Power BI Tips

In this post, I will go to an example of creating great visuals with the help of the new power bi feature called “Custom label” in visual labels.

In this example, we have a Clustered Bar chart with “Category” and “Sum of Order Quantity”:

The label shows the Sum of Order Quantity for each category, But I like to see “Sales Amount” also in my visual label. To find “Custom label”, first go to “Format” of the Visual then select “Data Label” part:

Next, click on “ON” for the “Custom label” section:

In the “Field” add measure “Custom label”:

Then give the result we were looking for. “Order Quantity and Sales” on the same label.


“Custom label” will bring your visual information and view to the next level.

For more details please refer to this YouTube video from Bas:

https://youtu.be/EiIAkJ9R7mM?si=fQnKY1oV32aNR_1h


Do you like this feature? Comment below.

Drill Through in the on-object Interaction – Power BI Tips

Sometimes clients ask for details when clicking on the specific field in the visual of the report page. One of the best ways to show it without putting lots of space on the main page is Drill Through in Power BI reports.

In this post, I will show an example of using the Drill Through in the report.

Start by creating the details page to show more details to clients about the main Category they will select. So I gathered all possible details on one page based on Categories and named it “Category details”:

Once the details page is ready, fix the page instead of standard –> Drill Through and select the data based on the Category filter. The top left corner of the page’s back arrow will be created by default:

Then on the main page in each category selecting “Drill through” will appear:

If you want to use left-click for this purpose then active the “Drill Through” on the top ribbon and then use the Category Drill Through selecting:

If you use “drill through” in your Power BI reports, comment below.

New Card Visual – Power BI Tips

New Card Visual is the latest update in Power BI from Microsoft. I was playing with that to see how it works, so I prepared a demo to show you two examples of this new Card visual.

I added the visual to Power BI canvas:

Add data to the Card, by default it looks like this:

Changed the shape from rectangle to the Snipped tab:

Then added the label set:

Next, change the color of the Background:

Added the Shadow and the Glow:

For better looking, added an Accent bar:

In the end, the Card looks like this:

As a second example, I changed the settings:

For adding the background, I created a simple rectangle by using Figma and after exporting, added that to the Card background:

For more beauty, I added an image to the Card:

And here is the result:

New Card visual is an easy way to design Card visuals in Power BI reports.
Do you use this visual from now? Comment your thoughts.

Dynamic format string for measures – Power BI Tips

Dynamic formatting for measure is the way that we can define the format for measure, no matter the measure is using which data type.

I will explain this topic by the example.

I have the simple dataset and created the “Total Sales” measure just for the example and use this measure in two different kind of use cases for the dynamic format string.

The first scenario is when we need to show the amount of measure with ” K, M, B” instead of 3, 6, and 9 zeros at the end.
So, I selected the measure –> Format –> Dynamic. Once click on Dynamic, the measure will have a dropdown for format setting. In the Format part, we can do each format that we want. For example, I put this:

And after applying this format, here is the result:

We can order this measure, and it is not counting as a string.

The second Scenario is about the country’s currency. We can define the currency symbol for each country and show it all in the same measure.
Here is the Format that I used for the dynamic currency:

And here is the result:

And still we can order this measure:

For more details please look at this YouTube video by Parvinder:

I would love to see your comments.

Field parameter dynamically change chart axis by selecting slicer-Power BI Tips

Today, I created a demo about the Field parameter and would love to share the details with you.

I used Adventure Work DB and added a bar chart to the report page. In this bar chart, we have a hierarchy of Country-Region, Category, and Color fields in x-Axis, and the “Sales Amount” for the values of y-Axis.
Each time we can select the hierarchy dropdown in the bar chart for looking at “Sales Amount” in each field:

I was looking for a way to add a slicer that makes end-users comfortable selecting the field, instead of dropping it down from the chart. At this point, I ended up using the Field Parameter in the report.

First, I added a field parameter from the Modeling part of the Power BI desktop:

Then selected the Country-Region, Category, and Color fields for the slicer:

Note that the slicer will not be working till the Field parameter not added to the visuals:

  • I changed the name of the Country-Region field to the “Country”.

After adding a Field parameter to the bar chart, Slicer can filter the visuals and dynamically change the fields of the x-Axis:

I changed the visual to the Matrix visual and here is the result:

Then added the dynamic title for this visual by this simple code:

I added a column to the table because “Measure Title” should read field names from that column otherwise it is not work.

Here is the result after adding a dynamic title:

Are you using the field parameter? Comment your thoughts.

Clear / apply all slicers Button – Power BI Tips

At the update in March 2023 of Power BI, we saw the new feature Clear all slicer button and Apply all slicer button.
I created a demo and used these two buttons in the demo and I would like to share it with you.
I started by clicking on “Insert” on the top ribbon of the Power BI desktop, then selecting “Buttons” and then “Clear all slicers“. Next, select ” Apply all slicers“.

Once these two buttons appear on the report page, simply start to use them. First, for applying slicers, I selected all slicers that were needed, then (Ctrl + click) on the “Apply all slicers” button. After clicking, Slicers will filter the report visuals based on the selection of all slicers.

For example, I selected Bikes in the Category slicer, Mountain Bikes on the Subcategory slicer, internet in the Channel slicer, and Black in Color slicer. Then (Ctrl + Click) on the “Apply all slicers” button.

Next, instead of going to each slicer and clearing one by one, (Ctrl + click) on the “Clear all slicers” button on the report page and clear all the slicers, then the report page will no longer show filters on slicers.

From now, I will use this feature more in my new reports. How about you? Comment below. 😊

Next Level Power BI Report Design with Figma

Figma is a digital design and prototyping tool. It is a UI and UX design application that you can use to create websites, apps, or smaller user interface components that can be integrated into other projects.

Figma could be used to improve the report design in Power BI.

One of the main improvements in report designs is creating a related background for the report page.

In this post, I created a simple example of background by using this powerful design tool, Figma.

To start with Figma, I created an account using my google account and used that. For more details about it, click here.

As a simple example, I prepared one report page of the Power BI report.

On this page, there are four small visuals and one big visual.

Before starting the creation of the background for this page, we should find the exact page dimension and use that dimension in Figma.
By clicking on the white space of the report page in Power BI then selecting “Format page” in the Visualizations panel, in the “Canvas settings” there is the Height and Width of the report page, ” 1280 * 720″.

Next, open the Figma page and start with “New design file”.

Continue adding “Frame” the same size as the Power BI report page.

Here, I selected “TV” frame.

Then, added one rectangle (1280*720) on top of the Frame.

Next, added circles to add colors that I want on top of the rectangle.

Here are the details of this circle filling with the Angular position and adding the colors you need for the report. I used random colors for this example:

In the “Effects” section, I used “Layer blur” with 200 “Blur”:

Then I copied more circles to fill the rectangle.

Here is the result for the first step of creating the report background:

Based on the Power BI report page, there is just one big visual, so I added one big rectangle on top of all steps with four angles curve 20.
Fill it with “grey”, stork set to “white 0.5” and the effect is “Drop shadow”.

Then I added the name of report, “Sales Report”.

I added small rectangle and fill with “Angular” position,

The rest of the setting is the same as a big rectangle.

Then I copied three more of this small rectangle because we have four slicers on our report page:

Then I selected “TV-1” and exported it with the “SVG” format.

Then I added this SVG file as a background for the report page and removed all visual’s backgrounds and borders.

Here is the result:

Did you use Figma before? Which tools you use to design your Power BI reports?

Comment your thoughts.

Check my YouTube video about it:

Add Theme and Font to Power BI Reports – Power BI Tips#14

Have you ever customized a theme or added font to your Power BI reports?
In this blog post, I will explain to customize a theme and add a font to the Power BI report.
For example, I picked color codes from the Microsoft logo and customized the theme inside the Power BI desktop.
On the top ribbon of Power BI desktop click on View then select Theme and next select Customize current theme and change Theme colors based on color codes that picked from Microsoft Logo.
Other tabs will allow you to customize Text, Visuals, Page, and Filter pane fonts, and sizes,…

After applying changes by clicking on the Apply button, all reports will effect by that new changes.

Next, click on Save current theme and save this theme on your device for the next usage.

To add a new font to Power BI, open the .json file of the theme and modify the font. For example, this .json file has Calibri font:

I replace Calibri with Fira Sans font.

First, make sure that the font is installed on the computer, then add the new font and save the theme with the new name.

In the last step, browse for that new theme on the computer and select:

Now, the new font appears in the report.

The report with the new font will work on Power BI Service and all windows computers that have this font installed.

If you have to create more than one report for one company, it is better to create a customized theme and use it for all Power BI reports for that company.

These are great sites you can create themes and use in your Power BI reports:

https://themes.powerbi.tips/

https://powerbithemegenerator.com/

Let me know what you think. 👊

Part1: Adding “ALL” to the TopN slicer, Part2: List of all N values to the slicer (using parameter) – Power BI Tips #13

As some friends asked me questions about Tip#12, I picked two of them:

1)How to add “All” to the “TopN slicer”?

2)How to create the slicer to select each number N we need to evaluate TopN?

I wrote about the TopN slicer in my previous post Power BI Tips#12 and will continue to answer these questions in this post.

The first part, Starts by adding the row “All” to the column String TopN, which is the column of the Table I created previously for the slicer. (I explained this with all details in the post “Power BI Tips #12)

Then we can change that measure we had before to this:

Next, use this measure in Sales Amount(Rank):

Then we have this result:

Second Part, I will show creating all the different N values that exist in the column we want to pick TopN based on that. Dynamic TopN based on the distinct count of that column.

First, I added a parameter from the modeling tab:

There are lots of ways to achieve this goal. I used a Numeric range that was incremented by the number 1 and put the random number for the “Max”. When the column table appeared, I selected on parameter column and changed the Max range to the Max number of different cells in the “Color” column:

The parameter code gives me a single-column table with different N values from 1 to Max non-blank values that I need for TopN. The “Color” column has 10 distinct values.

Then simply change the measure we had before:

Next, added “Pick N 2” to the main measure:

And, here is what we expected:

Comment your thoughts.

Top N Slicer (RANKX Function) – Power BI Tips#12

Have you ever used Top N Slicer in your Power BI reports?
This post will show you how to create Top N Slicer.

In this example, we will find Top N Product Colors based on their Sales Amount.

First, I wrote the RankX Measure:

Then, I added a Table and Data Manually to the report for the Top N Number That needs in this report. This Table has Two Columns, “String Top N” and “Values Top N”:

And Sort “String Top N” by “Values Top N”:

Next, add Slicer to the report and select the “String Top N” column.

For connecting Slicer to other Visual, I created measure Pick N:

Pick N measure will pick Values From “Values Top N” column.
If either selected from Slicer, measure Pick N shows “Values Top N” or if not, it shows Max Rank Value that exists. That means this measure always gives us the number.

Then we will apply Pick N measure to the measure Sales Amount (Rank) then instead of “Sales Amount” that’s connected to the Slicer Top N.

And here is the result:

Comment below with your ideas about this post !!!