Forum Discussion
How to create conditional variable with dynamic values?
- 11 months ago
Hi iadbmd
To help me reproduce your scenario and better understand why the slicer selections aren’t affecting the measure, could you please share a small but representative sample dataset in a usable format.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.Please show the expected outcome based on the sample data you provided.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
I am still struggling. Below are the definitions of what I have:
1. A measure
1.1 Status=
VAR _phase = SELECTEDVALUE(Database[Phase])
VAR _type = SELECTEDVALUE(Database[Type])
VAR _option1 = 'LON Prep'[LON Prep Value]
VAR _option2 = 'LON EXE'[LON EXE Value]
VAR _option3 = 'TC PREP'[TC PREP Value]
VAR _option4 = 'TC EXE'[TC EXE Value]
VAR result = SWITCH(
TRUE(),
_type = "LON" && _phase = "Prep", _option1,
_type = "LON" && _phase = "Exe", _option2,
_type = "TC" && _phase = "Prep", _option3,
_type = "TC" && _phase = "Exe", _option4,
5
)
RETURN result2. Each _option is defined as a disconnected table and has an associated dropdown slicer to allow the user to change the values for testing:
LON Prep = GENERATESERIES(0, 2.1, 0.1)
The issue is the measure is not reacting to changes in _option using the dropdown slicers. I need to create bar charts showing the average value of measure 1.1 Status by Location (another column in Database). Each Location can have multiple rows in Database, which can have any combination of values for Phase and Type.
Hi iadbmd
To help me reproduce your scenario and better understand why the slicer selections aren’t affecting the measure, could you please share a small but representative sample dataset in a usable format.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
- v-aatheeque11 months agoCommunity Support
Hi iadbmd
To help us reproduce and troubleshoot your scenario, we requested to share a small sample dataset/file. Could you please provide that when convenient?
It will allow us to give you a more accurate and tailored solution. - iadbmd6 months agoFrequent Visitor
Hello,
After a long time I have provided a sample table from my dataset in the posts' body. I included examples of what I want to calculate as well.