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

Get Total Sum of values in Measure in Card Visual

Hi,

 

I've attempted all suggested solutions for this type of problem but to no avail. My tables are a little more complex. I've created a separate table that contains all my measures. I am filtering my original table by refreshdate which is a column in the table so that I can compare two different values of the same table based on their refreshdate. To do so I created a measures:

'CR AFTER = CALCULATE ( SUM ( 'Table 1'[CR] ),

FILTER (Table 1,'Table 1'[Refresh DateTime]= MAX ( 'Table 1'[Refresh DateTime] )))'
 

Opportunity_before = CALCULATE ( MAX ( 'Table 1'[Stage] ),

FILTER (Table 1,'Table 1'[Refresh DateTime]= MIN ( 'Table 1'[Refresh DateTime] )))
 

'Opportunity_after = CALCULATE ( MAX ( 'Table 1'[Stage] ),

FILTER (Table 1,'Table 1'[Refresh DateTime]= MAX ( 'Table 1'[Refresh DateTime] )))
 
These measures all live in a second table called 'Table 2'
I then created a table visual which allows me to see which deals were WON based on the MAX date chosen in my date filter (the date filter is just my refresh dates). This works perfectly fine and I am able to see the CR AFTER for each opportunity. However, I want to show the TOTAL CR of all opportunities in a 'card' visual using a separate measure. This is where I reach a roadblock. I tried SUMX but it just resulted in a 0:
TOTALWIN = SUMX('Table 2',IF('Table 2'[opportunity_After]= "WON" && 'Table 2'[opportunity_Before] <> "WON",[CR AFTER],0))
and I can't sum on measures. However, the TOTALWIN as a column seems to have the same result as CR AFTER. Below is a picture of what I mean:
CR.PNG
3 REPLIES 3
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

It seems you may try to use variables in the formula.If you need further help,please follow the How to Get Your Question Answered Quickly to post your simplified assumed data and expected output.It is very hard to provide an accurate solution without looking at sample data.It would be better if you can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I've attempted variables but they also don't work.

Hi @Anonymous 

Could you post your simplified assumed data to reproduce your scenario?

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.