Forum Discussion
Need help with Measure (Average, Summarize)
- 4 years ago
Hi danandr87 ,
Try to create a measure like below:
Measure 2 = var total = CALCULATE([Measure],FILTER(ALL('Table'),'Table'[Period]="X")) var count_x =CALCULATE(DISTINCTCOUNT('Table'[YYMM]),FILTER(ALL('Table'),NOT(ISBLANK([Measure]))&&'Table'[Period]="X")) return DIVIDE(total,count_x,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanks for this answer, but it doesnt meet my requirement. For calculation of the average I want the quantities aggregated per month, but only for the months with PERIOD = X. But these months are not the months in my chart. So the calcualtion must somehow happen in the background ignoring any row and filter contexts, only considering the SKU as a filtering parameter.
danandr87
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- danandr874 years agoNew Member
I don't know how to attach a file to this forum and i am not allowed to upload files into a cloud with my work computer. But i took some screenhots of my simplified data model.
FactTable:
DateTable:
This is my requirement: