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
DHEG97
Frequent Visitor

Switch 2 Filter to show the opposite result

Hello,
I have 2 Filters selected From and To
(e.g. From (Germany) and To (France) )

FROM               TO              Volume FROM-TO              Volume TO-FROM

DE                     FR               2000


This shows me the volume we generated for this relation in a separate column
now I want to show the volume if the flow will go reversed (without changing the filters)

(This is how its been displayed right now for the "Volume From" column)

Volume FROM-TO =
VAR FromC =
FILTER('Table', 'Table'[FromCountry]=SELECTEDVALUE('Table'[FromCountry]))
RETURN
CALCULATE(SUM('Table'[Volume]),FromC)


Now I need a similar measure to dispay into the opposite direction for the"Volume to" column

Any ideas how to display this?

2 REPLIES 2
amitchandak
Super User
Super User

@DHEG97 ,

 

Volume FROM-TO =
VAR FromC =
FILTER('Table', 'Table'[toCountry]=SELECTEDVALUE('Table'[ToCountry]))
RETURN
CALCULATE(SUM('Table'[Volume]),FromC)

 

or

 

Volume FROM-TO =
VAR FromC =
FILTER('Table', 'Table'[FromCountry]=SELECTEDVALUE('Table'[ToCountry]) && 'Table'[FromCountry]=SELECTEDVALUE('Table'[FromCountry]))
RETURN
CALCULATE(SUM('Table'[Volume]),FromC)

 @amitchandak The first option will show me the volume from-to aswell in the new column
and the second option shows only blank entries

Where can I attach sample Data?

"The file type (.pbit) is not supported."

Drag and drop doesnt work in this case
 

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.