March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I need advice on how to filter.
I have this table and I need when I filter Haulier (ZEMPRA-HRDINA) so I can see all haulier at the destination (all ID Destination 3 and 5).
Thank you
Ondřej
Solved! Go to Solution.
Hi @Fidzi8
1. Create this measure:
ShowMeasure =
VAR ids_ =
CALCULATETABLE (
DISTINCT ( Table1[ID Destination] ),
TREATAS ( DISTINCT ( Dim[Haulier] ), Table1[Haulier] ),
ALLSELECTED(Table1)
)
RETURN
IF ( SELECTEDVALUE ( Table1[ID Destination] ) IN ids_, 1, 0 )
2. Use the measure as filter for the visual, choosing to show when value of the measure is 1
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Can you share the pbix (with dummy data if necessary)?
By the way, you do not need to have ShowMeasure in the visual. It is enough if you place it as filter visual and select to show it when the value is 1
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@Fidzi8 , Create Haulier as an independent table for filter
Dim = distinct(Table[Haulier]) //use in slicer
Measure =
var _id = summarize(filter(Table, Table[Haulier] in values(Dim [Haulier])),Table[ID Destination])
return
calculate(countrows(Table), filter(Table, Table[ID Destination] in _id))
use this measure with other required columns
Thank you @amitchandak,
I created new table: Dim = distinct(Table[Haulier]) // and I used in slicer
and I created measure but I don´t see other haulier at the destination.
Thank you
Ondřej
Hi @Fidzi8
1. Create this measure:
ShowMeasure =
VAR ids_ =
CALCULATETABLE (
DISTINCT ( Table1[ID Destination] ),
TREATAS ( DISTINCT ( Dim[Haulier] ), Table1[Haulier] ),
ALLSELECTED(Table1)
)
RETURN
IF ( SELECTEDVALUE ( Table1[ID Destination] ) IN ids_, 1, 0 )
2. Use the measure as filter for the visual, choosing to show when value of the measure is 1
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thank you @AlB and @amitchandak,
Can I color separated by ID destination in PowerBI?
Thank you
Ondřej
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
82 | |
77 | |
66 | |
57 |
User | Count |
---|---|
134 | |
117 | |
99 | |
84 | |
83 |