Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello Community,
I'm having trouble with DAX query in Power BI Report Builder. Main problem is how to apply multiple filters in Dataset query.
Report builder is connected with dataset from PBI Service.
Main dataset contain one field and one measure. (this is just test example)
In order to create parameters, two new datasets are created: trt, dataset2
Request: If user select "ALL" main query should remove any filters from that field, if user select some value, data should be filtered by that value.
I modified main query in order to apply parameters. I managed to apply only first parameter
side note:@ResselerKljuc parameter is coming from trt dataset
With that formula I achive my goal: If user select “ALL” show all data, if user select some value from "trt" dataset, main table should be filtered by this value.
Now I am struggling to add one more condition in that DAX query. (@SalesOrderParameter)
Hello,
I am trying to select ALL values in a parameter.
There are two parameters: "ResellerKljuc" and SalesOrderParameter".
When user run the report there are 3 scenarios:
A) Parameter1 is selected, Parameter 2 should be by default: ALL
B) Parameter2 is selected, Parameter 1 should be by default: ALL
C) Parameter 1 and 2 are selected
If I configure parameter properties, and set default value to get data from parameter dataset (datasets created just for parameter purpose), I will have performace issue, because each time whole query will be genarated.
That is why I modified parameter query, I added extra row "ALL". (as you can see in photo above - (dataset "trt" and "dataset2")).
Logic in the main dataset (dataset1) should be:
A Scenario (Parameter1 is selected, Parameter 2 should be by default: ALL)
1. IF value "ALL" is selected in first slicer ("ResellerKljuc"), ignore any filter contex in main dataset1 for that Filed (meanwhile Parameter2, "SalesOrderNumber" should show all data by default")
2. IF some other value is selected, dataset1 should be filtered by this selected value
B Scenario (Parameter2 is selected, Parameter 1 should be by default: ALL)
1. IF value "ALL" is selected in second slicer ("SalesOrderParameter"), ignore any filter contex in main dataset1 for that Filed (meanwhile Parameter1, "ResellerKljuc" should show all data by default")
2. IF some other value is selected, dataset1 should be filtered by this selected value
C Scenario ( Parameter 1 and 2 are selected)
1. IF both parameter 1 and 2 are selected, dataset1 should be filtered by those selectedvalues
Hi @TheDataPub ,
Sorry for not being able to understand your needs?.
What exactly are you trying to accomplish and what results are you trying to achieve?
Best regards,
Community Support Team Selina zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
18 | |
17 |
User | Count |
---|---|
33 | |
25 | |
18 | |
15 | |
13 |