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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
pkiran
Frequent Visitor

Extracting values of 2 measures referring to 2 different slicers

Hi,

   This is my first post on this forum, so kindly excuse me if I skipped any protocols. 

   I have a fitness related model wherein I need to pick a customer from one slicer and then using the other slicer(having the same list of names as the first slicer but only the col umn duplicated and renamed) to pick any of the other names in the list, my measure must be able to display the two values side by side. I am able to generate the individual cards correctly(Avg_HR_orig and Avg_HR_compn), but when I create variables for the two and the  try to use them in a third measure (check1_HR) to get the 2 outputs side by side, I am able to get only one correct value and not the other.

I have attached the pbix file. Kindly help me out.

Reqt: ex: 108|104->for the Name:Comparison_name combo of Armani Singleton:Bailey Craig

File link-> https://drive.google.com/file/d/12EYHJvg2FCJu7bGrH2PKLOAiCY3nQOiz/view?usp=drive_link

 

1 ACCEPTED SOLUTION
ERD
Community Champion
Community Champion

@pkiran ,

I've made the relashionship inactive and used 2 measures. Both slicers interact with check1_HR card:

ERD_1-1691130769695.png

Avg_HR_compn = 
VAR c_user = SELECTEDVALUE ( slicer2[Comparison_Name] )
RETURN
    CALCULATE ( [Avg_Heart_Rate], dimUser[Name] = c_user )
Avg_HR_orig = 
VAR c_user = SELECTEDVALUE ( dimUser[Name] )
RETURN
    CALCULATE ( [Avg_Heart_Rate], dimUser[Name] = c_user )

ERD_2-1691130880326.png

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

5 REPLIES 5
ERD
Community Champion
Community Champion

@pkiran ,

I've made the relashionship inactive and used 2 measures. Both slicers interact with check1_HR card:

ERD_1-1691130769695.png

Avg_HR_compn = 
VAR c_user = SELECTEDVALUE ( slicer2[Comparison_Name] )
RETURN
    CALCULATE ( [Avg_Heart_Rate], dimUser[Name] = c_user )
Avg_HR_orig = 
VAR c_user = SELECTEDVALUE ( dimUser[Name] )
RETURN
    CALCULATE ( [Avg_Heart_Rate], dimUser[Name] = c_user )

ERD_2-1691130880326.png

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

pkiran
Frequent Visitor

Hi ERD,

          Thank you very much for the solution. It worked like a charm...just one question though, how did making the relationship inactive enable this? Has this got to do with multiple relationships in the model?? Can you kindly elaborate on this??

Thanks...

ERD
Community Champion
Community Champion

You needed to grab the value without filtering this card at the same time. Having active relashionship won't allow this as it will filter the card with different values at the same time. 

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

ERD
Community Champion
Community Champion

Hi @pkiran ,

The file has restricted access.

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

pkiran
Frequent Visitor

Hi,

  Sorry about that...PFB the corrected link...
https://drive.google.com/file/d/12EYHJvg2FCJu7bGrH2PKLOAiCY3nQOiz/view?usp=sharing

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.