Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello All, Have a calendar table and facts table linked by date. I have a date filter where dates are flagged as trailing 12 month and the dates are atrributed to a monthyear column
I can visually show count(BillIDs) by month. But what i want to show the trailing twelve month average of the monthly totals.
IN theory something like this
calculate(Avg(Jan Total+Feb Total+March Total+....), DateFilter="TTM")
Thanks for your help.
Solved! Go to Solution.
You can try an expression like this using your existing measure in place of [Your Measure]. If no measure, wrap the expression inside CALCULATE( ) and replace [Your Measure].
Twelve Month Avg =
CALCULATE (
AVERAGEX ( VALUES ( 'Calendar'[MonthYear] ), [Your Measure] ),
ALL ( 'Calendar' ),
'Calendar'[DateFilter] = "TTM"
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can try an expression like this using your existing measure in place of [Your Measure]. If no measure, wrap the expression inside CALCULATE( ) and replace [Your Measure].
Twelve Month Avg =
CALCULATE (
AVERAGEX ( VALUES ( 'Calendar'[MonthYear] ), [Your Measure] ),
ALL ( 'Calendar' ),
'Calendar'[DateFilter] = "TTM"
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I guess i am confused on the VALUES ( 'Calendar'[MonthYear] )
I ahve 1 table called calendar with the MOnth year in it
I have another table called placements where I will do a measure called "total placements"=count(billid)
What do I put in the DAX again?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |