Forum Discussion

lm_suresh's avatar
lm_suresh
Frequent Visitor
1 year ago
Solved

YTD Calculation with count

Hi  Need graph like below.  Please help in BI  X – Axis –  Up to 2024 (DEC), 2025 ( TILL JUNE) , 2025 planned ( June to Dec ), 2026 planned , 1960, 1950 Y axis – Count of Ctls Legend – Status   ...
  • tharunkumarRTK's avatar
    1 year ago

    lm_suresh 

    1. create a calcuated column 

    PeriodBucket = 
    SWITCH(
        TRUE(),
        YEAR([Date]) = 1950, "1950",
        YEAR([Date]) = 1960, "1960",
        [Date] <= DATE(2024,12,31), "Up to 2024 (DEC)",
        [Date] <= DATE(2025,6,30), "2025 (TILL JUNE)",
        [Date] <= DATE(2025,12,31), "2025 Planned (June to Dec)",
        [Date] <= DATE(2026,12,31), "2026 Planned",
        "Other"
    )
    

    put this column in x axis 

     

    2. Create a DAX measure 

    Ctls Count = COUNTROWS('YourTableName')
    

    put this measure in y axis 

    3. Put status column in legend field 

     

    thats it

     

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!