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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
reynold522
Helper II
Helper II

totalsum value in table visual and card

Hi all, 

 

I put several measure in a table visual and count of TotalSum in card visual like following graph.
Overview.PNG

table is filtered with totalSum>0 as well as date 

measure TotalSum = [Charge factorN]+[Deep DischargeN]+[MinVoltageN]+[Voltage diffN]+[DischargeAhN]+[DoDoverboundaryN]

 I count number of TotalSum as well and put in card visual. other filter conditiona is same with table visual. the code is as following

## of Notifications =
VAR _value =SUMX ( VALUES ( 'RUAN_GLOBALMATIX_TRACKSHEET_L_V'[XTCU_ID_NUMBER] ), IF ( [TotalSum] >0, 1,0 ) )
RETURN
IF( _Value= BLANK(), 0, _Value)

question: the number of row in visual table should be equal to number shows in card visual

what could cause the difference?

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @reynold522 ,

 

According to your case description, you first create a measure [TotalSum] to calculate as the sum of the other five measures, and then use the Sumx() function and use the Values() function inside to give your measure [TotalSum] in the context created separately for the column 'RUAN_GLOBALMATIX_TRACKSHEET_L_V' [XTCU_ID_NUMBER] Came to make an If judgment and counted. 

 

Since the five measures you referenced in the measure [TotalSum] are not provided, my current judgment on the root cause of the problem seems to be related to the up and down questions built in your Sumx() function, because your table visual has two dimension columns. If convenient, you can try using the Summarize() function to build the context of two dimension columns, like this:

## of Notifications =
VAR _value =
    SUMX (
        SUMMARIZE ( 'RUAN_GLOBALMATIX_TRACKSHEET_L_V', [XTCU_ID_NUMBER], [REGION] ),
        IF ( [TotalSum] > 0, 1, 0 )
    )
RETURN
    IF ( _Value = BLANK (), 0, _Value )

Then look at the output value, if there is still a problem, please upload your .pbix file with this problem (does not contain sensitive data).

 

Best Regards,

Neeko Tang

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

3 REPLIES 3
Anonymous
Not applicable

Hi @reynold522 ,

 

According to your case description, you first create a measure [TotalSum] to calculate as the sum of the other five measures, and then use the Sumx() function and use the Values() function inside to give your measure [TotalSum] in the context created separately for the column 'RUAN_GLOBALMATIX_TRACKSHEET_L_V' [XTCU_ID_NUMBER] Came to make an If judgment and counted. 

 

Since the five measures you referenced in the measure [TotalSum] are not provided, my current judgment on the root cause of the problem seems to be related to the up and down questions built in your Sumx() function, because your table visual has two dimension columns. If convenient, you can try using the Summarize() function to build the context of two dimension columns, like this:

## of Notifications =
VAR _value =
    SUMX (
        SUMMARIZE ( 'RUAN_GLOBALMATIX_TRACKSHEET_L_V', [XTCU_ID_NUMBER], [REGION] ),
        IF ( [TotalSum] > 0, 1, 0 )
    )
RETURN
    IF ( _Value = BLANK (), 0, _Value )

Then look at the output value, if there is still a problem, please upload your .pbix file with this problem (does not contain sensitive data).

 

Best Regards,

Neeko Tang

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

amitchandak
Super User
Super User

@reynold522 , Change return like

Sumx(summarize(Table, Table[XCTU_ID_NUMBER], Table[REgion], "_1", calculate(IF( _Value= BLANK(), 0, _Value))), [_1])

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

this code dont work, thank you anyway

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.