Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

WhatIf dimension issue with slicer

I am using a WhatIf to determine if a response time has "met" target, the target being the what-if.

We want to see if we change the target, how many will meet the target.

This works perfectly if all my data is in one table.

 

However, when I move one of my dimensions (Apparatus) to a separate table and join them, the slicer for Apparatus no longer filters the table properly.

 

In my sample file linked below, I have 2 slicers. One using Apparatus in the data table, one using Apparatus table joined.

When you choose an apparatus from the DIM table, the table does not filter properly. Instead it shows all rows but clears the data.

 

https://drive.google.com/file/d/1gfrhN272N3-cVE-1TVLC8ozbidur_VwQ/view?usp=sharing

 

Goal: Change the Target (WhatIf) and be able to filter the data table using a separate DIM table (Apparatus)

1 ACCEPTED SOLUTION
BIcurate
New Member

Hi @Anonymous 

 

The reason for the behaviour you're experiencing is that the measure ([MeetsTarget]) that you defined is being calculated for all members, regardless of whether there is a value for [ResponseTime] or not.

 

MeetsTarget = if(Parameter[Parameter Value]>[ResponseTime];"Yes";"No")
 
This behaviour is because the Parameter[Parameter Value] measure always has a value.
 
To fix the measure to exhibit the behaviour you want, all that is needed is to check whether [ResponseTime] is BLANK(), and handle that differently.
 
MeetsTargetFixed = if(ISBLANK([ResponseTime]);BLANK();if(Parameter[Parameter Value]>[ResponseTime];"Yes";"No"))
 
Hope this helps
 
**** PLEASE NOTE, MY LOCALE SETTINGS USE ";" AS DELIMETERS, YOURS MAY USE ","

View solution in original post

2 REPLIES 2
BIcurate
New Member

Hi @Anonymous 

 

The reason for the behaviour you're experiencing is that the measure ([MeetsTarget]) that you defined is being calculated for all members, regardless of whether there is a value for [ResponseTime] or not.

 

MeetsTarget = if(Parameter[Parameter Value]>[ResponseTime];"Yes";"No")
 
This behaviour is because the Parameter[Parameter Value] measure always has a value.
 
To fix the measure to exhibit the behaviour you want, all that is needed is to check whether [ResponseTime] is BLANK(), and handle that differently.
 
MeetsTargetFixed = if(ISBLANK([ResponseTime]);BLANK();if(Parameter[Parameter Value]>[ResponseTime];"Yes";"No"))
 
Hope this helps
 
**** PLEASE NOTE, MY LOCALE SETTINGS USE ";" AS DELIMETERS, YOURS MAY USE ","
Anonymous
Not applicable

Thanks so much! I knew this was a dax problem.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.