Forum Discussion

ncbshiva's avatar
ncbshiva
Icon for Advocate V rankAdvocate V
6 years ago
Solved

Cumulative Count with Date Slicer

Hi All,   I have a Cumulative Count with a Date Slicer in a Table Visual. I have a date table which is linked to my FACT table by Date.   In the above screenshot , my first column is Cumulati...
  • Anonymous's avatar
    Anonymous
    6 years ago

    hi ncbshiva ,

     

    Here's the test data I used:

    Table “fact”

    Table “date”

    Please check following steps as below:

    1. Delete relationship if there is any relationship between table “date” and table “fact”.
    2. Create measure:

              Measure =

              CALCULATE (

                  COUNT ( 'fact'[id] ),

                  FILTER ( ALLSELECTED ( 'fact' ), 'fact'[date] <= MAX ( 'fact'[date] ) )

              )

              Measure 3 =

              VAR sv =

                  SELECTEDVALUE ( 'date'[date], BLANK () )

              RETURN

                  IF ( MAX ( 'fact'[date] ) > sv, BLANK (), [Measure] )

    1. Results would be shown as below:

    Pbix as attached, hopefully works for you.

     

    Community Support Team _ Jay Wang

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