The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi need help on showing missing value in slicer based on other slice.
I am using slicer (new) to show sum of values by filtering date.
Ex: Date "1/2/2024" has no values of "B" in name and i need to show it by "* No data".
Please find the screen shot below.
Thanks in advance
Solved! Go to Solution.
Hi @User232431 ,
Because Slicer doesn't support measure, you'll need to create a calculated table and calculated columns. This will show "A5" as well as "B*No Data" in the slicer. You also need to create a relationship between the calculated table and the original table in order for the two slicers to interact.
Here is my test and attached pbix file for your reference.
1. Calculated Table.
Table 2 = CROSSJOIN(VALUES('Table'[Date]),VALUES('Table'[Name]))
2. Calculated Column.
SumOfValue = VAR test=CALCULATE(SUM('Table'[Value]),'Table'[Date]=EARLIER('Table 2'[Date])&&'Table'[Name]=EARLIER('Table 2'[Name]))
RETURN if(ISBLANK(test),[Name]&"*No Data",[Name]&": "&test)
3. Relationship.
Many to Many(Table filters Table2)
4. Output.
Best regards,
Mengmeng Li
Hi @User232431 ,
Because Slicer doesn't support measure, you'll need to create a calculated table and calculated columns. This will show "A5" as well as "B*No Data" in the slicer. You also need to create a relationship between the calculated table and the original table in order for the two slicers to interact.
Here is my test and attached pbix file for your reference.
1. Calculated Table.
Table 2 = CROSSJOIN(VALUES('Table'[Date]),VALUES('Table'[Name]))
2. Calculated Column.
SumOfValue = VAR test=CALCULATE(SUM('Table'[Value]),'Table'[Date]=EARLIER('Table 2'[Date])&&'Table'[Name]=EARLIER('Table 2'[Name]))
RETURN if(ISBLANK(test),[Name]&"*No Data",[Name]&": "&test)
3. Relationship.
Many to Many(Table filters Table2)
4. Output.
Best regards,
Mengmeng Li
@User232431 Follow the below steps:
Step1: Create a new table as
Thanks for a reply , i you can share the pbix file that would be helpful.
To show missing values in a slicer based on another slicer in Power BI, you can use a combination of DAX measures and conditional formatting. Here’s a step-by-step guide to achieve this:
Create a Measure to Check for Missing Values:
MissingValueCheck = IF( ISBLANK(SUM('YourTable'[Value])), "* No data", SUM('YourTable'[Value]) )
Add the Measure to Your Visual:
Use Conditional Formatting:
Sync Slicers:
Test Your Setup:
This approach will help you dynamically show missing values in your slicer based on the selection of another slicer. If you need more detailed steps or run into any issues, feel free to ask!