The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi there, I have this data here
Location Type
ABB008 STS
ABB008 DOI
ABB009 FI
ABB025 FI
ABB035 DOI
ABB135 FI
ABB270 RED
ABB270 STS
I need to come up with a way to show the locations that have STS and at least another type associated. Like ABB270 has STS and RED.
thank you so much!!
Solved! Go to Solution.
You can write a measure like this:
Filter =
VAR _sts = CALCULATETABLE ( VALUES ( YourTable[Location] ), YourTable[Type] = "STS" )
VAR _other = CALCULATETABLE ( VALUES ( YourTable[Location] ), YourTable[Type] <> "STS" )
VAR _list = INTERSECT ( _sts, _other )
RETURN
CALCULATE ( COUNTROWS ( YourTable ), _list )
Then use that as a filter on the visual to return only the Location that have STS + other.
plse try this corrected code
You can write a measure like this:
Filter =
VAR _sts = CALCULATETABLE ( VALUES ( YourTable[Location] ), YourTable[Type] = "STS" )
VAR _other = CALCULATETABLE ( VALUES ( YourTable[Location] ), YourTable[Type] <> "STS" )
VAR _list = INTERSECT ( _sts, _other )
RETURN
CALCULATE ( COUNTROWS ( YourTable ), _list )
Then use that as a filter on the visual to return only the Location that have STS + other.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
73 | |
52 | |
50 |
User | Count |
---|---|
129 | |
123 | |
78 | |
64 | |
60 |