Forum Discussion

suvechha's avatar
suvechha
Helper IV
5 years ago
Solved

Card value ?

Hi there,

How the Card values work showing Total as 200 , Completed as 11 and Pending as 186 , even when there other filter applied. ?

 


My sample model card value is different value when the filter selection is done, but my requirement is the card values should show this values
Total as 200 , Completed as 11 and Pending as 186 even there is filter selection.

 

 

4 Replies

  • suvechha , If Completed  and Pending are values of dimension say status then

     

    Calculate(Count(Table[Col]), all(Table[Status]))
    or
    Calculate(Count(Table[Col]), allselected(Table[Status]))

    if they are meausre on different columns
    [Completed] +[Pending]

     

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

     

    • suvechha's avatar
      suvechha
      Helper IV

      Hi Amit,

      They are measures-

       

      Completed :--

      Completed =
      CALCULATE (
      DISTINCTCOUNT ( ChangeDetails[CHANGEID] ),
      FILTER('Change_StageDefinition',Change_StageDefinition[DISPLAYNAME]= "Close"
      ),FILTER('Change_StatusDefinition',Change_StatusDefinition[STATUSDISPLAYNAME]="Completed"
      ))
       
      Pending:-
      Pending =
      CALCULATE (
      DISTINCTCOUNT ( ChangeDetails[CHANGEID] ),
      FILTER('Change_StageDefinition',Change_StageDefinition[DISPLAYNAME] <> "Close"
      ),FILTER('Change_StatusDefinition',Change_StatusDefinition[STATUSDISPLAYNAME] <> "Completed" && Change_StatusDefinition[STATUSDISPLAYNAME] <> "Cancelled"
      ))
       
      and Total :-
       
      Total = CALCULATE((DISTINCTCOUNT(ChangeDetails[CHANGEID])))
       
      Please find the sample file in the link-
       
      Thanks
      Suvechha
      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi, suvechha 

        Use the "all" function to limit  current tables in the filter condition.

        New Pending = 
        CALCULATE (
            DISTINCTCOUNT ( ChangeDetails[CHANGEID] ),
            FILTER(ALL('Change_StageDefinition'),Change_StageDefinition[DISPLAYNAME] <> "Close"
         ),FILTER(ALL('Change_StatusDefinition'),Change_StatusDefinition[STATUSDISPLAYNAME] <> "Completed" && Change_StatusDefinition[STATUSDISPLAYNAME] <> "Cancelled"
        ))
        New Total = CALCULATE( [Total],ALL(Change_StatusDefinition),ALL(Change_StageDefinition))
        New Completed = 
        CALCULATE (
            DISTINCTCOUNT ( ChangeDetails[CHANGEID] ),
            FILTER(ALL('Change_StageDefinition'),Change_StageDefinition[DISPLAYNAME]= "Close"
         ),FILTER(ALL('Change_StatusDefinition'),Change_StatusDefinition[STATUSDISPLAYNAME]="Completed"
        ))

        For more details ,please check attached pbix file.

         

        As  mentioned by ryan_mayu ,you can also directly disable the interaction between card visuals and  each slicer.

         

         

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