The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Everyone,
I've this table I want to create a running total, In the sample data the months are repeating but I want just the 12 months in a year,I tried using some dax calculations
but it didnt work,I also want to calculate the running total by profit restarting every year.
Sample data:https://drive.google.com/file/d/1vRL7p4xT3PAmWhZRhVKdsaZjvaluYzDF/view?usp=sharing
Outcome wished
Thanks in Advance.
Solved! Go to Solution.
Hi @ENGFAKAYODE ,
You can create a measure as below if there is one date field or month number filed in your table.
Running Total =
VAR _selyear =
SELECTEDVALUE ( 'Table'[Year] )
VAR _selmnum =
SELECTEDVALUE ( 'Table'[Month Number] )
RETURN
CALCULATE (
SUM ( 'Table'[Profit] ),
FILTER (
'Table',
'Table'[Year] = _selyear
&& 'Table'[Month Number] <= _selmnum
)
)
In addition, you can refer the following links to get the running total....
If the above ones can't help you, could you please grant us the proper access to your shared file? Thank you.
Best Regards
Hi,
Thank you for your message, and please check the below measure and the attached pbix file whether it suits your requirement.
Yearly running total measure: =
CALCULATE (
SUM ( Orders[Profit] ),
FILTER (
ALL ( Orders ),
Orders[Order Date] <= MAX ( Orders[Order Date] )
&& Orders[Year] = MAX ( Orders[Year] )
)
)
Hi @ENGFAKAYODE ,
You can create a measure as below if there is one date field or month number filed in your table.
Running Total =
VAR _selyear =
SELECTEDVALUE ( 'Table'[Year] )
VAR _selmnum =
SELECTEDVALUE ( 'Table'[Month Number] )
RETURN
CALCULATE (
SUM ( 'Table'[Profit] ),
FILTER (
'Table',
'Table'[Year] = _selyear
&& 'Table'[Month Number] <= _selmnum
)
)
In addition, you can refer the following links to get the running total....
If the above ones can't help you, could you please grant us the proper access to your shared file? Thank you.
Best Regards
https://drive.google.com/file/d/1htXjhknwwPlLUSS5YOQJFU0i6Fzvx1F5/view?usp=sharing
this is the real link it's working
Hi,
Thank you for your message, and please check the below measure and the attached pbix file whether it suits your requirement.
Yearly running total measure: =
CALCULATE (
SUM ( Orders[Profit] ),
FILTER (
ALL ( Orders ),
Orders[Order Date] <= MAX ( Orders[Order Date] )
&& Orders[Year] = MAX ( Orders[Year] )
)
)
Hi,
The link is not accessible.
Please check.
Thanks.
https://drive.google.com/file/d/1htXjhknwwPlLUSS5YOQJFU0i6Fzvx1F5/view?usp=sharing
this is the real link it's working
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |