Forum Discussion
Boris_EmV
2 years agoFrequent Visitor
Average per row by date
Hi, I have this sample data: Date Patient TreatID COGS 1/1/2023 A 1 1100 1/3/2023 A 1 1100 1/5/2023 A 1 1100 1/8/2023 A 1 1100 1/10/2023 A 1 1100 1/11/2023 A...
- Anonymous2 years ago
Hi Boris_EmV ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a measure
Average = VAR _COUNT = COUNTROWS(ALL('Table')) RETURN IF( ISFILTERED('Table'[COGS]), SELECTEDVALUE('Table'[COGS])/_COUNT, SELECTEDVALUE('Table'[COGS]) )Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
2 years agoNot applicable
Hi Boris_EmV ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a measure
Average =
VAR _COUNT = COUNTROWS(ALL('Table'))
RETURN
IF(
ISFILTERED('Table'[COGS]),
SELECTEDVALUE('Table'[COGS])/_COUNT,
SELECTEDVALUE('Table'[COGS])
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly