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
Anonymous
Not applicable

Sum of measures does not work - segment/filter issue

Hi ,

 

I have 2 measures :

 

CO2_tlseParis = Switch ( True(),
SELECTEDVALUE(mode_transport[transport_commute],"") = "avion",SELECTEDVALUE(tlseParis[distance],0) * 0.0826 * 2 + SELECTEDVALUE('hubBureau'[distance],0)* 0,

SELECTEDVALUE(mode_transport[transport_commute],"") = "voiture" ,SELECTEDVALUE(tlseParis[distance],0) * 0.0130 * 2 + SELECTEDVALUE('hubBureau'[distance],0) * 0,
SELECTEDVALUE(mode_transport[transport_distance],0) = 0,0
)
 
CO2_hubBureau = Switch ( True(),
SELECTEDVALUE(mode_transport[transport_commute],"") = "taxi_uber", SELECTEDVALUE('hubBureau'[distance],0) * 0.055 * 2 * 5 ,

SELECTEDVALUE(mode_transport[transport_commute],"") = "metro" ,SELECTEDVALUE('hubBureau'[distance],0) * 0.003 * 2 * 5

)
 
With the current filters, I get :
 
CO2_tlseParis = 26
CO2_hubBureau = 35.75
 
 
 
When I sum both measure in another one I get 0.
 
I guess my issue comes from the interaction between filters. Indeed, each measure depends on 2 filters each, with one common dataset and 2  with 2 different ones.
 
Any idea how I could deal with this?
 
 
 
 
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Anonymous , 

I think this might be cuased by the interactions of visual. In your scenario, I find that there is no relationship between each other, so I think you could create another tables for slicer instead of use slicer from same table. You could  refer to my sample for details.

Best Regards,
Zoe Zhi

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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , seems strange.Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Please note that the issue comes from the measure at the bottom of the page

dax
Community Support
Community Support

Hi @Anonymous , 

I think this might be cuased by the interactions of visual. In your scenario, I find that there is no relationship between each other, so I think you could create another tables for slicer instead of use slicer from same table. You could  refer to my sample for details.

Best Regards,
Zoe Zhi

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

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.