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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Represent column value in a card

Dear team, 

 

Please help me with the following problem scenario:

 

I want to print the value of a parameter in such a way:

Sample Data

 

Date     Parameter   Value 

24/6         A              78

24/6         B              82

25/6         A              89

26/6         B              76

 

Case1: 

If user selects date as 24/6, print 78 on a card, if parameter == A, else 82

 

Case2 

If user selects date as 25/6, print 89 on a card,  if parameter == A, else 76

 

Case 3:

If user selects both dates, then print the average(83.5 in this case) on the card, else average of B parameter corresponding values

 

Thanks in advance

2 ACCEPTED SOLUTIONS
Tahreem24
Super User
Super User

@Anonymous ,

Try the below measure:

Measure =  CALCULATE(AVERAGE(Sheet6[Value]),ALLEXCEPT(Sheet6,Sheet6[Parameter],Sheet6[Date]))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

amitchandak
Super User
Super User

@Anonymous , Try like

if(selectedvalue(Table[Parameter]="A"),Average(Table[Value]),calculate(Average(Table[Value]),Table[Parameter]="B"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try like

if(selectedvalue(Table[Parameter]="A"),Average(Table[Value]),calculate(Average(Table[Value]),Table[Parameter]="B"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Tahreem24
Super User
Super User

@Anonymous ,

Try the below measure:

Measure =  CALCULATE(AVERAGE(Sheet6[Value]),ALLEXCEPT(Sheet6,Sheet6[Parameter],Sheet6[Date]))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Anonymous ,

For your convience I have uploaded PBIX file.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.