Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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

 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    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]))
    

     

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

6 Replies

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      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]))

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

        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]))
        

         

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