Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, i'm stuck. I have this table :
It's a visual table containing some field from my unique table model. And measures which are TauxMarge, VarTM and VarTM_Note.
Code for the measure VarTM_Note : It return a rating acording to the value of the variation.
VarTM_Notenb =
SWITCH(
TRUE(),
ABS([VarTM]) >= 0.1, 5,
ABS([VarTM]) >= 0.05 && ABS([VarTM]) < 0.1 , 4,
ABS([VarTM]) >= 0.03 && ABS([VarTM]) < 0.05 , 3,
ABS([VarTM]) >= 0.01 && ABS([VarTM]) < 0.03, 2,
1
)
I need to sort this visual table by this measure somehow. But when i try to do it, it take the first column where VarTM_Note is (red). But i only want to sort it by second one (green), because the first one is useless and will be hidden due to the fact that it try to measure a variation and give it a rating on the first year of my data.
This is the source table that i use to create part of this visual table :
What would be the best way to go about it ?
@gaalee89 , is it a table of matrix. On matrix you can sort on column or mesure total
@amitchandak it is a table of matrix, but may i ask you to show me how to sort on a measure total in this case ?
I tried it this way :
But Power BI doesn't seem to correctly calculate the result for neither of the measures VarTM and VarTM_Note. Probably because i use the PREVIOUSYEAR method i would assume.
VarTM =
var TMI = [TauxMarge]
var TMcalc = [TauxMarge] - CALCULATE([TauxMarge] , PREVIOUSYEAR('model'[Date]))
RETURN IF(TMI = TMcalc,0, TMcalc)
I thought about an other measure that can calculate this result on itself but i can't think on how to properly do it.
Hi. @gaalee89
From your screenshot, the row total value of VarTM_Notenb seems to be incorrect.
You can try to add a new measure as below and then sort by this field in matrix.
VarTM_Notenb_2 = SUMX('Table',[VarTM_Notenb])
If it doesn't work, please share a sample file for further research.
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |