Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am relatively new to PowerBi and I have been looking to practice on some example data.
My aim is to count the number of rows in my dataset (Based on number of fires and there is 1 fire per row) in the current financial year to date and the same time in the previous financial year (FY runs from 1/4 to 31/3).
I have come across a previous chat which I have replicated the solution from in my own dataset successfully. However this was designed for calendar year and I would like to ammend it for financial year.
Any help on how to do this based on the below DAX would be greatly appreciated.
Total Sales =
CALCULATE(SUM(Data[Sales]))
YTD prods =
CALCULATE (
[Total Sales],
FILTER (
'Calendar',
'Calendar'[Year] = YEAR ( TODAY () )
&& 'Calendar'[Date] <= TODAY ()
)
)
LY YTD Sales =
CALCULATE (
[Total Sales],
FILTER (
'Calendar',
'Calendar'[Year]
= YEAR ( TODAY () ) - 1
&& 'Calendar'[Date]
<= EOMONTH ( TODAY (), -13 ) + DAY ( TODAY () )
)
)
Difference% =
DIVIDE([YTD prods] - [LY YTD Sales],[LY YTD Sales])
User | Count |
---|---|
25 | |
11 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
13 | |
12 | |
10 | |
6 |