Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
TheDataPub
New Member

DAX SUMARIZECOLUMNS with multiple filters - Paginated report

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)

TheDataPub_0-1663151869862.png

In order to create parameters, two new datasets are created: trt, dataset2

TheDataPub_1-1663152018034.png

TheDataPub_2-1663152067768.png

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

TheDataPub_3-1663152117422.png

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)

 

2 REPLIES 2
TheDataPub
New Member

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

v-mengzhu-msft
Community Support
Community Support

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

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.