The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys,
I am working on a dynamic dax measure which I like to use for one visual. Basically I want to have one visual that shows the costs. Based on the dynamic filter which I put into the x-axis field, the user is able to filter by various categories which come from various data sources. All are string values e.g by category, by city etc. I tried so many things but the Code just doesnt work. I dont want to create a extra table and merge all these categories inside, I just want it to work how it is. Thank you in advance!
DynamicMeasureNEW =
VAR SelectedColumn = SELECTEDVALUE(DynamicTable[Column1])
RETURN
SWITCH (
SelectedColumn,
"Delay Reason", VALUES(MedicallyFitForDischarge[FIT_REASON]),
"Care Group", VALUES(Look_New_Trust_Hierarchy[CARE_GROUP]),
"Specialty", VALUES(Look_Specialty[Specialty Description]),
"Ward", VALUES(MedicallyFitForDischarge[LOCATION]),
BLANK() // Return BLANK() for unmatched cases
)
Hey @hadichami ,
You aren't able to use a measure in the Axis portion of a visual. There could be a custom visual that would allow for this, but it is difficult to find any solutions to your problem. If your choice was always going to be static (would be set by the developer), then this would be much more doable, but right now I can't find any solutions to your problem.
One other thing that you could try is creating dynamic values instead of a dynamic axis. I don't think this is what you are wanting, but it might be the next best answer to your problem.
Other Note: If you were able to create a calculated column that would be dynamic you may have a great solution. I haven't been able to find a way to do this, but it would be worth looking into.
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |