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
GJ217
Resolver III
Resolver III

Card Visual not totalling correctly

Hi All,

I a Card Visiual that showing a total of 4978 instead of 5235. When you click on the Divisions individually the correct values come back but do not sum correclty as a total in the card when they are all deselected.

 

The measure behined the Card is  Starters = CALCULATE(COUNT(Starters[Person Number]))  with a Relative date,  is in the last 12 calendar months Month & Year  filter 

 

Can anyone please tell me how to correct this?

 

 Headline Figures
Divison11326
Divison21266
Divison31072
Divison4564
Divison5495
Divison6263
Divison7133
Divison8116
Card Total4978

 

 

 

1 ACCEPTED SOLUTION

Hi @GJ217 ,

I have created a simple sample, please refer to it to see if it helps you.

starters_ = MAX('Table'[value])
measure = var _a = 'table'[starters_]
var _b = SUMMARIZE('table','table'[date],"aaa", 'table'[starters_])
return
IF(HASONEVALUE('table'[date]),_a,SUMX(_b,[aaa]))

vpollymsft_0-1671584986074.png

 

 "aaa" is a new column in the table _b. It is 'table'[starters_] in the table _b.

 

You can understand it in conjunction with my simple example.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

6 REPLIES 6
v-rongtiep-msft
Community Support
Community Support

Hi @GJ217 ,

Is the measure result incorrect?  If so, Please have a try.

Then create a measure based on the Starters.

 

measure= = var _a = 'table'[starters_]
var _b = SUMMARIZE('table','table'[date],"aaa", 'table'[starters_])
return
IF(HASONEVALUE('table'[date]),_a,SUMX(_b,[aaa]))

 

You can also use other unique values instead of date columns, such as index columns.

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-rongtiep-msft 

 

I'm lost at the the "aaa" part I can't seem to find thevariable for this in the below, could you please confirm what this is?

 

measure= = var _a = 'table'[starters_]
var _b = SUMMARIZE('table','table'[date],"aaa", 'table'[starters_])
return
IF(HASONEVALUE('table'[date]),_a,SUMX(_b,[aaa]))

 

Hi @GJ217 ,

I have created a simple sample, please refer to it to see if it helps you.

starters_ = MAX('Table'[value])
measure = var _a = 'table'[starters_]
var _b = SUMMARIZE('table','table'[date],"aaa", 'table'[starters_])
return
IF(HASONEVALUE('table'[date]),_a,SUMX(_b,[aaa]))

vpollymsft_0-1671584986074.png

 

 "aaa" is a new column in the table _b. It is 'table'[starters_] in the table _b.

 

You can understand it in conjunction with my simple example.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-rongtiep-msft 

Thank you.

Your example makes sense  and when you add the measure to a card it shows the correct Total of 46. However my model is complicated in that the Starters table lists each person with their start date by row.

 

I have the following measures for Starters to get the Value column you have in your example:

Starters Count = COUNT(Starters[Person Number])
Starters = CALCULATE([Starters Count],USERELATIONSHIP(Dates[Date],Starters[Work Relationship Start Date]))+0
 
 
Mahesh0016
Super User
Super User

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Hi  @Mahesh0016 ,

 

I the data set is peopla data so all of it is sensitive and it will take me some time to create a dummy copy as there are many tables.

 

Thanks for the offer still.

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.