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

How do I show a card value based off a slicer from a different table?

9.png

In the attached image, the visual I am having trouble with is the card at the bottom.
This card is meant to show the month with the highest energy consumption. I have disabled the month slicer's (at the top) interaction with the card. The only thing affecting the card should be the year slicer (at the top left). So for 2020, It should show January instead of April. 

The Month data is from the energy_consumption table, and the year slicer is from the contracted_capacity table. 

Any suggestions? Thanks

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

Hi @doveShampoo 

You can create a measure, and put the measure to the card

Measure = var a=ADDCOLUMNS(ALL(energy_consumption),"month",energy_consumption[Date].[Month])
var b=SUMMARIZE(a,[Year],[month],"sum",SUM(energy_consumption[energy_consumption]))
var c=MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])),[sum])
return MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])&&[sum]=c),[month])

Output

vxinruzhumsft_0-1684292349363.png

 

Best Regards!

Yolo Zhu

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

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @doveShampoo 

You can create a measure, and put the measure to the card

Measure = var a=ADDCOLUMNS(ALL(energy_consumption),"month",energy_consumption[Date].[Month])
var b=SUMMARIZE(a,[Year],[month],"sum",SUM(energy_consumption[energy_consumption]))
var c=MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])),[sum])
return MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])&&[sum]=c),[month])

Output

vxinruzhumsft_0-1684292349363.png

 

Best Regards!

Yolo Zhu

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.