March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a table called Store_DIM which has Region, District, Store columns. In the Power BI Report Builder while creating the dataset in the Query Designer, I dragged the Region column, that was not having duplicates at first. But as soon as I brought District column there are multiple repeated regions based on multiple districts under the same region.
Because of this I'm unable to properly create a Region Parameter.
Here is the DAX Query for the same: - EVALUATE SUMMARIZECOLUMNS('V_STORE_DIM'[Region], 'V_STORE_DIM'[District], RSCustomDaxFilter(@VSTOREDIMRegion,EqualToCondition,[V_STORE_DIM].[Region],String), RSCustomDaxFilter(@VSTOREDIMDistrict,EqualToCondition,[V_STORE_DIM].[District],String))
The last two lines of this query is nothing but I'm bringing the Region and District Parameters created from the dataset, which I don't wanted to use, as this is causing issue when I map them to the Query parameters - as the Query Parameters are not becoming editable when I map the selected Region and District Parameters. Hence I want to point out the source dataset's corresponding table columns itself for the query parameters created. Can someone please help me with how to fix this DAX Query, so that it should take only the distinct values of the Region and District columns to use them to map to the Query parameters?
you can use below dax to get distinct values.
EVALUATE
DISTINCT(
SUMMARIZE(
'V_STORE_DIM',
'V_STORE_DIM'[Region],
'V_STORE_DIM'[District]
)
)
mark this reply as answer is this resolves your issue.
If this helped, Follow this blog for more insightful information about data analytics:
https://analyticpulse.blogspot.com/2024/03/superstore-sales-2022-vs-2023-year-on.html
https://analyticpulse.blogspot.com/
Please Subscribe AnalyticPulse on YouTube for future updates:
https://www.youtube.com/@AnalyticPulse
Please subscribe CogniJourney On Youtube For Daily fun facts:
https://www.youtube.com/@CogniJourney
thats strange i checked it with my table before post reply.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
36 | |
26 | |
19 | |
11 | |
8 |
User | Count |
---|---|
54 | |
43 | |
24 | |
13 | |
12 |