The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts ,
Need to calculate average for below dax formula
Please help.
B | C | D | E | F | G | H | I | J | K | L | M | |
Opening HC | 2477 | 2498 | 2506 | 2567 | 2690 | 2780 | 2792 | 2782 | 2776 | 2765 | 2753 | 2744 |
Closing HC | 2498 | 2506 | 2567 | 2690 | 2780 | 2792 | 2782 | 2776 | 2765 | 2753 | 2744 | 2741 |
Average HC | 2488 | 2502 | 2537 | 2629 | 2735 | 2786 | 2787 | 2779 | 2771 | 2759 | 2749 | 2743 |
AVERAGE(B3:L3) | AVERAGE(B3:M3) |
Hello,
I created multiple DAX measures:
Opening HC =
CALCULATE(
AVERAGE('Table'[Value]),
'Table'[Status] = "Opening HC"
)
Closing HC =
CALCULATE(
AVERAGE('Table'[Value]),
'Table'[Status] = "Closing HC"
)
I then calculated the Average measure:
Average HC =
CALCULATE(
AVERAGE('Table'[Value]),
FILTER( 'Table',
'Table'[Status] IN {"Opening HC", "Closing HC"})
)
I used a Matrix visualization and I switched values to rows.
If it answers your query, please mark my reply as the solution
Hi @Alex87 ,
I want to replicate that excel formulas using below dax measures
Average HC = DIVIDE( [Opening HC] + [Closing HC],2 )
Without sample data, I cannot help you much. Please provide the necessary data and détail your problem and expectations.