Forum Discussion
Choosing different variable
Hello all! *I can't use calculated column because I'm getting the data by Streaming Direct Query on PBI online..
I would like to choose the variable value, for example..
This is level fiter, and is selected "is = 2", sorry about the portuguese...
Measure A = //I don't know how to do it
Measure B =
IF{ table [Measure A] = 1; This does something;
IF{ table [Measure A] = 2; This does otherthing( Would select this if Measure A was working, as you can see at the image above);
IF{ table [Measure A] = 3; This is the command that I want to select via level filter;
IF{ table [Measure A] = 4; As this one...;
}
This is just a way I think can solve my problem, I want to select different functions into one measure( Measure B). And I want to insert Measure B in one visual table. Doesn't exist a way of inserting data into the report, right, like...
CALCULATING CAR SPEED
Insert distance:_______
Insert time:_______
CALCULATE
Thank you all,
Best Regards,
Diego
Hi sirros_iot,
You need to have a reference to a column or another table that allows you to do it.
Regards,
MFelix
6 Replies
- MFelix
Super User
Hi sirros_iot,
Not sure about the question you are making not really explicit and with very little data.
Regarding the last part of you question you can add variables in your DAX expression something like
CAR SPEED =
VAR InsertDistance = MAX(Table[Distance])
Var Inserttime = MAX(Table[Speed])
Return
CALCULATE (insertdistabce x inserttime)
Can you share sample.data.and expected.result for better help.
Regards
MFelix- sirros_iot
Helper III
Sorry about the mess ... I don't have PRO level to share you the report.. I will try to explain it better I have a visual table in my report, and there I have one column that is a measure. The measure has a variable, but I don't have value to that variable. I want to choose the variable value, is that possible? Is there a way of entering the data? Or selecting from 4 options could be a way. Thank you, Diego - sirros_iot
Helper III
- MFelix
Super User
Hi sirros_iot,
I created a PBIX file with a sample data, I have created a table with the What If option on the modeling tab,
Then created a measure with a variable that is based on the table created in the previous step, that selects the lue on the slicer.
This is just a simple example but it how it works.
Regards,
MFelix