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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Use measure in a slicer and adjust the data type accordingly

I want to use measure in a slicer, and I have foud  a lot of tips on how to do this, and all of them work well. For example (https://community.powerbi.com/t5/Desktop/switch-measure-with-multiple-select-slicer-data/td-p/598650... https://www.youtube.com/watch?v=gYbGNeYD4OY

 

The measure I have used: 

Total = IF (ISCROSSFILTERED('Measure Dim'[Measure]),SWITCH(True(),
VALUES('Measure Dim'[Measure]) = "Number of Sales", WebOrder_Mahn_Cost[TotalSales],
VALUES('Measure Dim'[Measure]) = "Total Cost in €", WebOrder_Mahn_Cost[TotalCost],
BLANK()
), BLANK())
 
Where TotalSales is a measure for the total number of sales , while TotalCost is a measure for their cost. 
 
The problem I am facing is that using this method I cannot see TotalCost as a currency type, but rather as decimal when I change the measure in the slicer.
I have tried to use CURRENCY() in the measure and it is still not showing me the currency after the number, and if I put the data type currency for the measure (Total) it will give both TotalCost and TotalSales as currencies, which I also don't want. 
 
Any way to get around this problem? Best regards
2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous First, you do not need to use VALUES in your formula, I would ditch it. 

 

Second, I do not know of a way to do this. Have gone round and round on this subject in a number of threads and tried all kinds of different ways of getting around this but in the end, have never found a good way to do this other than using FORMAT, which turns things into text which you probably do not want.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

How should I get rid of Value? Because I defined a table "Measure Dim" with the two names "Number of Sales" and "Total Cost in €" and (as far as my understandning) I need to use Value to match it with the name of the table. 

 

And how can I use format to show the currency? and if I used it I will probably not be able to use filters on the measure, right? 

 

Thank in Advance  

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors