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.
I would appericate it if someone can help me.
How do I create a DAX formula to only show specific value.
For example, I would like to create a Dax formula to only show branch 19, 22, 27 and exclude the rest of the branch. I do not want to use the exclude using the filter.
you can add a IF function in your measures, such as
IF(SELECTEDVALUE(table[Branch]) IN {19,22,27},[old measure])
I tried that and it doesn't seem to work either.
I was unable to generate a slicer after creating the measure.
Hi @noble10
Could you please share a screenshot from the error you ean into here? or share the sample of your PBIX (power bi) file here to be able to work on it.
Appreciate your Kudos !!
Hi @noble10
Please try this measure:
Filtered Branch =
CALCULATE (
FIRSTNONBLANK ( 'Table'[Location Name], "" ),
FILTER ( 'Table', 'Table'[Branch] IN { 19, 22, 27 } )
)
the output will be as below:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi VahidDM,
Thank you so much for your help! I unfortunately was not able to select the measure as a slicer. Not sure why?
Hi @noble10
Try to add a column with this code to your table:
IF you want to have Branch No. in your slicer:
Filtered Branch = if('Table'[Branch] in{19,22,21},'Table'[Branch])
If you want to have a Location Name in your slicer:
Filtered Branch = if('Table'[Branch] in{19,22,21},'Table'[Location Name])
Then add Filtered Branch column to your slicer.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
52 | |
46 | |
15 | |
12 |