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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Uday02
Frequent Visitor

Sum profit with two filters

Hi All,

 

The dataset that I'm using has a profit column that contains both profit and loss numbers.
Now I am trying to evaluate Total Profit by filtering the column with values greater than 0 and loss with values less than 0.

 

But I have to specify another condition that whenever I am filtering the data through a slicer it should not impact my Total Profit card visual.

Now I can do that by editing interactions but I want to achieve it by using Dax.

 

OrderBreakdown and Calendar Tabales do not have a relationship 

 

Uday02_1-1660909807640.png

Thank you in advance.

Calculations using DAX 

1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

Not sure on this, but I think it might be something like:

[My Measure] = CALCULATE ( SUM ( 'table'[column] ), ALL ('table 2'[column you don't want affecting the filtering]) )

(sorry for the 'air-ware')

Hope this helps




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
ToddChitt
Super User
Super User

Not sure on this, but I think it might be something like:

[My Measure] = CALCULATE ( SUM ( 'table'[column] ), ALL ('table 2'[column you don't want affecting the filtering]) )

(sorry for the 'air-ware')

Hope this helps




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





It worked. Thank you so much.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.