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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Showing Data by Financial Year

I have data that has open and closed dates in it as well as reasons that something has occured. I also have a calendar table set up with reference date in.

 

I want to be able to show a graph with the number of times a reason occured in cases that were opened in 17/18, the number they occured in 18/19 and the reasons for current open cases.

 

I presume I need to do something with measures but I am not sure what

 

Thanks

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may use below measure to get the count for each year.Attached simplified sample file for your reference.

Count =
CALCULATE (
    DISTINCTCOUNT ( Table1[CaseID] ),
    FILTER (
        GENERATE ( Table1, 'Calendar' ),
        Table1[Open date] <= 'Calendar'[Date]
            && Table1[Close date] >= 'Calendar'[Date]
    )
)
CountTotal = SUMX(VALUES('Calendar'[Date].[Year]),[Count])

Regards,

Community Support Team _ Cherie Chen
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

2 REPLIES 2
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may use below measure to get the count for each year.Attached simplified sample file for your reference.

Count =
CALCULATE (
    DISTINCTCOUNT ( Table1[CaseID] ),
    FILTER (
        GENERATE ( Table1, 'Calendar' ),
        Table1[Open date] <= 'Calendar'[Date]
            && Table1[Close date] >= 'Calendar'[Date]
    )
)
CountTotal = SUMX(VALUES('Calendar'[Date].[Year]),[Count])

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Perfect - thank you 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.