Forum Discussion
Anonymous
6 years agoNot applicable
Matrix not returning the correct Total Amount
Hello,
I would like to build a matrix that would return the correct total amount.
The rows on this matrix are pre-defined by an auxiliary table (since I want want them to follow that Order).
The auxiliary table that looks like the following:
Measure Index
| Measure 1 | 1 |
| Measure 2 | 2 |
| Measure 3 | 3 |
| Measure 4 | 4 |
And a measure is the following:
Table_Measures = SWITCH(
LASTNONBLANK(Aux[Measure],1),
"Measure 1",10,
"Measure 2",20,
"Measure 3",5,
"Measure 4",5,
"")
I would like my Matrix to return the correct total (40), and instead returns amount 5:
Any help would be much appreciated. 🙂
- Anonymous6 years ago
Try something like
Total=
var Table_Measures = SWITCH(LASTNONBLANK(Aux[Measure],1),"Measure 1",10,"Measure 2",20,"Measure 3",5,"Measure 4",5,"")returnif(hasonevalue[aux[measure]],Table_Measures,sum([Table_Measures])Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
2 Replies
- AnonymousNot applicable
Try something like
Total=
var Table_Measures = SWITCH(LASTNONBLANK(Aux[Measure],1),"Measure 1",10,"Measure 2",20,"Measure 3",5,"Measure 4",5,"")returnif(hasonevalue[aux[measure]],Table_Measures,sum([Table_Measures])Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.- AnonymousNot applicable
It worked 🙂
Thank you so much!