Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there ! - a quick qn. i have the below table which i am using a "line chart" to plot the trend line. X-axis the is YYYY-MM column, and Y-AXIS is SUM(WARNINGS), and legend is TEAM. So basically a trend of total warnings of each team by month. I would like a DAX to create a average trending line by month (i.e. no horizontal but an average of total warning by month). What is a quick DAX code to use ?
|
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Warnings avg: =
VAR _maxdatefacttable =
CALCULATE ( MAX ( Data[yyyy-mm] ), REMOVEFILTERS ( 'Calendar' ) )
RETURN
IF (
MAX ( 'Calendar'[Year-Month sort] ) <= EOMONTH ( _maxdatefacttable, 0 ),
AVERAGE ( Data[Warnings] ) + 0
)
Hi @xlitol
If I understand you correctly, and the desired result is like in picture
The dax is :
Hi @xlitol
If I understand you correctly, and the desired result is like in picture
The dax is :
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Warnings avg: =
VAR _maxdatefacttable =
CALCULATE ( MAX ( Data[yyyy-mm] ), REMOVEFILTERS ( 'Calendar' ) )
RETURN
IF (
MAX ( 'Calendar'[Year-Month sort] ) <= EOMONTH ( _maxdatefacttable, 0 ),
AVERAGE ( Data[Warnings] ) + 0
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |