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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
niki_b
Helper I
Helper I

Parameters in Report Builder (DAX query from Power BI Report)

I am copying the dax query from PowerBI Performance analyser to create a report in Report Builder. The report works fine but I would like to add parameters just like slicers in PowerBI Report. I tried adding parameters manually but it does not work. Is there any way to make changes to my query.

I even tried this... 

 

 

 

 

TREATAS({@param}, 'table'[Column])

 

 

 

 

If anyone has any leads, it will be highly apppreciated.

I have tried the links to the articles posted in previous solutions. I was not able to figure it. 

Thanks a lot.

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @niki_b ,

 

I create a simple sample for adding parameters. Please check:

 

Sample data:

USE Test

CREATE TABLE Sales (
    Product VARCHAR(100),
	Store VARCHAR(100),
    Sales INT
)

INSERT INTO Sales VALUES('P1','S1',1)
INSERT INTO Sales VALUES('P2','S1',2)
INSERT INTO Sales VALUES('P3','S1',3)
INSERT INTO Sales VALUES('P1','S2',4)
INSERT INTO Sales VALUES('P4','S2',5)

 

Product Store Sales
P1 S1 1
P2 S1 2
P3 S1 3
P1 S2 4
P4 S2 5

 

para1.PNG

 

1. Create a data source.

 

2. Create a dataset needed.

 

3. Create Parameter tables for the fields needed.

Product.PNGStores.PNG

 

4. Create parameters.

ProductParameter.PNGProductParameter2.PNG

 

5. Modify Query of the dataset created in step2.

sales query.PNG

 

6. Test.

parameter.gif

 

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @niki_b ,

 

I create a simple sample for adding parameters. Please check:

 

Sample data:

USE Test

CREATE TABLE Sales (
    Product VARCHAR(100),
	Store VARCHAR(100),
    Sales INT
)

INSERT INTO Sales VALUES('P1','S1',1)
INSERT INTO Sales VALUES('P2','S1',2)
INSERT INTO Sales VALUES('P3','S1',3)
INSERT INTO Sales VALUES('P1','S2',4)
INSERT INTO Sales VALUES('P4','S2',5)

 

Product Store Sales
P1 S1 1
P2 S1 2
P3 S1 3
P1 S2 4
P4 S2 5

 

para1.PNG

 

1. Create a data source.

 

2. Create a dataset needed.

 

3. Create Parameter tables for the fields needed.

Product.PNGStores.PNG

 

4. Create parameters.

ProductParameter.PNGProductParameter2.PNG

 

5. Modify Query of the dataset created in step2.

sales query.PNG

 

6. Test.

parameter.gif

 

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AbhiSSRS
Solution Sage
Solution Sage

You can add parameters in Report Builder Add Params section and use them in DAX too. Could you please post more details like the DAX you are trying to insert these in and where have you added these params.

 

AbhiSSRS_0-1625045969077.png

 

I already tried adding parameters from there. It gives me all the values for that parameter even after slicing.

 

niki_b_0-1625264891463.png

 

 

As you can see in the above image, I have selected Increment in my parameter, it is still returning me all the rows. It means it is not working.

 

My DAX is as follows. I copied it from performance analyzer in my PowerBI report.

 

// DAX Query
DEFINE

VAR __DS0FilterTable =
TREATAS({"1"}, 'ruleBankTypesHistory'[Change?])

VAR __DS0Core =
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'ruleBankTypesHistory'[Type],
'ruleBankTypesHistory'[Old Value],
'ruleBankTypesHistory'[New Value],
'ruleBankTypesHistory'[Field],
'users'[Updated By],
'ruleBankTypesHistory'[updatedAt],
'Rules'[Rule Name],
'ruleset'[Ruleset],
__DS0FilterTable,
"CountRowsruleBankTypesHistory", CALCULATE(COUNTROWS('ruleBankTypesHistory'))
)
),
OR(
OR(
OR(
OR(
OR(
OR(
OR(
NOT(ISBLANK('ruleBankTypesHistory'[Type])),
NOT(ISBLANK('ruleBankTypesHistory'[Old Value]))
),
NOT(ISBLANK('ruleBankTypesHistory'[New Value]))
),
NOT(ISBLANK('ruleBankTypesHistory'[Field]))
),
NOT(ISBLANK('users'[Updated By]))
),
NOT(ISBLANK('ruleBankTypesHistory'[updatedAt]))
),
NOT(ISBLANK('Rules'[Rule Name]))
),
NOT(ISBLANK('ruleset'[Ruleset]))
)
)
),
"'ruleBankTypesHistory'[Type]", 'ruleBankTypesHistory'[Type],
"'ruleBankTypesHistory'[Old Value]", 'ruleBankTypesHistory'[Old Value],
"'ruleBankTypesHistory'[New Value]", 'ruleBankTypesHistory'[New Value],
"'ruleBankTypesHistory'[Field]", 'ruleBankTypesHistory'[Field],
"'users'[Updated By]", 'users'[Updated By],
"'ruleBankTypesHistory'[updatedAt]", 'ruleBankTypesHistory'[updatedAt],
"'Rules'[Rule Name]", 'Rules'[Rule Name],
"'ruleset'[Ruleset]", 'ruleset'[Ruleset]
)

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.