Forum Discussion
Mesure dax
Hi,
The function that you are looking for is SWITCH combined with TRUE.
My example data:
Example measure:
End result:
Things to note:
If you need to do addition and substraction calculations combined with average you should do them separately before AVERAGE e.g. in a calculated column.
Hopefully this helps to solve your issue and if it does consider accepting this as a solution!
- Nihed4 years ago
Helper III
thank you for your return
what you have done is calculate each FI separately while
what I sent is a single measure that contains all this calculation I send you the data table in a pbix to explain my needthe need is to calculate this KPI:
The example data in pbix in this link :
Thanks again
- ValtteriN4 years ago
Community Champion
Hi,
Unfortunately due to information security reasons I can't view your example data. I am a bit perplexed as to why the switch measure doesn't work. The logic behind the measure is that if the source column's value is something e.g. "1-Planned/Not Started" then the measure returns value after the next comma. So in essence it functions like this:
var example = max(here you should refrer to the source fied e.g. [Steps]) return
Switch(true(),
if variable value = "1-Planned/Not Started" then return this
if variable value = "2 - TORs received/under review" then return this... and so on)
I am not sure this clarifies the logic or if I have misunderstood something.- Nihed4 years ago
Helper III
The problem that I can’t average because fields like following :
for example I have AVERAGE(TORs Completed - TORs received) how can i do it?: