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
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
Employee
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
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.