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
Alex-PBIComm
Helper II
Helper II

Measure with customized totals

Good afternoon everyone,

 

I'll try to be brief as everytime I post this message it goes to spam. Don't hesitate to ask for more info if the request is not clear.
I'd like to create a measure that displays a total calculated differently from the rows. I have a table with the total value of sales in local currencies and through SWITCH + Slicers I allow the user to recalculate the values for all markets converted in dollars.
My goal is, when the "local currency" view is selected, to see each row/market with the local currency but the total always converted in dollars.

Thanks in advance for your help!

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @Alex-PBIComm ,

 

If you have a question about something that just isn't working right, post as much information as you can, starting with your data. (Use sample data and remove sensitive data).Please include an example of the visual or the expected results of a calculation in your post.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @V-lianl-msft, as mentioned in my post I've been trying to post this successfully for about a month, ending up in spam all the times. That forced me to put minimal information in order not to have it marked.
Also, as some of my attempts where released from spam section, it caused duplicate posts which I didnt notice (https://community.powerbi.com/t5/Desktop/Measure-with-customized-totals/m-p/2217482#M809865). In the link I was able to provide more information on what's the expected result.


smpa01
Super User
Super User

@Alex-PBIComm  what is the current measure that gives the total?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Switch( TRUE(),

VALUES(Slicers[Conversion]) = "$ Conversion",
 
Calculate(SUM(Sales[c__SelloutPrice-Converted]),
filter(Sales,Sales[Date]>=date(year(max('Calendar'[Date])),month(max('Calendar'[Date]))-1,day(max('Calendar'[Date])))),
filter(Sales,Sales[Date<=max('Calendar'[Date]))),
 
VALUES(Slicers[Conversion]) = "Local Currency",
Calculate(SUM(Sales[Amount]),
filter(Sales,Sales[Date]>=date(year(max('Calendar'[Date])),month(max('Calendar'[Date]))-1,day(max('Calendar'[Date])))),
filter(Sales,Sales[Date<=max('Calendar'[Date]))),
 
Blank())

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.