Forum Discussion
polman4
4 years agoHelper I
Compare Column in a matrix
Hello, I have a matrix with the following data Rows Author Column Week Start Date = (nw_content[nw_c_publishdate]-WEEKDAY(nw_content[nw_c_publishdate],3) Values Pageviews. Below i...
- 4 years ago
Hi, polman4 ,
Create a measure ,
diff = var _max=CALCULATE(MAX('Table'[Column]),FILTER(ALL('Table'),[author]=MAX([author])&& [Column]<MAX([Column]))) var _pir= CALCULATE(SUM([value]),FILTER(ALL('Table'),[author]=MAX([author])&&[Column]=_max)) var _result= DIVIDE(SUM([value]),_pir)-1 return IF(_result=-1,BLANK(),_result)Or create a column.
differ = var _max=CALCULATE(MAX('Table'[Column]),FILTER(ALL('Table'),[author]=EARLIER([author])&& [Column]<EARLIER([Column]))) var _pir= CALCULATE(SUM([value]),FILTER(ALL('Table'),[author]=EARLIER([author])&&[Column]=_max)) var _result= DIVIDE([value],_pir)-1 return IF(_result=-1,BLANK(),_result)The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
4 years agoCommunity Support
Hi, polman4 ,
You could add another measure,
Measure = IF(ISINSCOPE('Table'[author]),[diff],SUMX( SUMMARIZE('Table',[author], [Column],"1",[diff]),[1]))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- polman44 years agoHelper I
Hello v-yalanwu-msft
I did a review today on some data and I think the measure % is not correct. If i'm not mistaken, what you is to summarize the percentages above. But this isn't correct mathematically.
Also if you do the calculation (211.51 / 194.66) -1 = 8,76. Not 39,07.
Thank you!