Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
sirros_iot
Helper III
Helper III

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..
MEASURE A.PNGThis 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

 

1 ACCEPTED SOLUTION

Hi @sirros_iot,

 

 

You need to have a reference to a column or another table that allows you to do it.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

6 REPLIES 6
MFelix
Super User
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

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hello @MFelix, do you if it is possible?

 

Thanks,

Diego

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.

 

variable.gif

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Thank you for the reply @MFelix! That's what I would like to do!

 

But I think I can't create that parameter table.. I'm getting the data by Push Streaming Dataset
Do you know a way of doing that without creating any data? 

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

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.