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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DB23
Frequent Visitor

Need to Calculate Difference in column data that is filtered and not-filtered

Hello,

 

I am trying to calculate the difference between total sales related to a selected/filtered price and total sales related to not selected prices.

 

For example if my selected price of $1.50 shows average weekly sales of $500,000 and I have another price of $2.00 to which I sold average $250,000, I want to be able to show on the $2.00 row a difference of -$250,000 ($250,000 - $500,000).  

 

The problem I run into is the filter will only show calculations related to the filtered price of $1.50 so I need to edit the relationship, but I need to utilize the SelectedValue function so that the filtered price is identified for calculating the difference in the other rows.  

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@DB23 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Plot-difference-between-two-rows-based-on-slicer-selection/...

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@DB23 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Plot-difference-between-two-rows-based-on-slicer-selection/...

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Difficult to say. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Might need to use ALL or ALLEXCEPT or REMOVEFILTERS somewhere.


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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.