cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors