Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI, I have a report that contains a directquery data model and I have no permissions to change it.
I had to create a few local tables and use them in the report. One of them i use as a slicer for the user to choose one or more of the options.
I created a slicer with a local table not connected to the dataset.
I want to take the choice the user makes and filter the data that is part of the data model
in the table to be filtered, I created a measure that brings in data from another table that's not connected in the relationship, using the TREATAS function. It's a measure.
Since the rule is that you can't put a measure in a slicer, I did the following
1) Created that local table with the three options you see above
2) User chooses the option(s)
My goal is to filter , but I can't seem to write the code that makes this happen. I see examples of calculating numerical data but can't find examples of a slicer option filtering text against the same text in a table
Any help appreciated. Thank you!
Solved! Go to Solution.
@Anonymous,
Create a measure using this pattern:
Row Count =
CALCULATE (
COUNTROWS ( DIM_DATE ),
SELECTEDVALUE ( SlicerTable[Month] ) = DIM_DATE[MONTH_DESC]
)
Assumptions:
1. DIM_DATE is a DirectQuery table.
2. SlicerTable is a disconnected table.
3. The slicer uses SlicerTable[Month].
Proud to be a Super User!
Hi @Anonymous
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous,
Create a measure using this pattern:
Row Count =
CALCULATE (
COUNTROWS ( DIM_DATE ),
SELECTEDVALUE ( SlicerTable[Month] ) = DIM_DATE[MONTH_DESC]
)
Assumptions:
1. DIM_DATE is a DirectQuery table.
2. SlicerTable is a disconnected table.
3. The slicer uses SlicerTable[Month].
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |