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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
stoppm
Frequent Visitor

Measure for a slicer that shows rows when slicer has a specific value

Hi, I've got a line chart that has a slicer with three time options: "day", "week", "month". I've got another calculated column that is a flag for the "day" values, with the options being 1 or 0. I want to create a measure that shows only rows in my "flag" column that are 1, only when the "day" is selected from the slicer, when "week" or "month" are filtered, I don't want the measure to do anything. Thanks for the help!

2 ACCEPTED SOLUTIONS
anilelmastasi
Super User
Super User

Hello @stoppm ,

 

Could you please try this:

 

MeasureFlag =
IF(
SELECTEDVALUE(SlicerTable[TimePeriod]) = "day",
CALCULATE(
SUM('YourTable'[FlagColumn]),
'YourTable'[FlagColumn] = 1
),
BLANK()
)

View solution in original post

v-sdhruv
Community Support
Community Support

Hi @stoppm ,
The error message "Parameter is not the correct type" in Power BI Desktop can occur when the data type of the column is not compatible with the expected data type. To resolve this issue, ensure that the column being used is an integer data type. You can use VALUE() function to convert the data type of the column to an integer. 
VALUE function (DAX) - DAX | Microsoft Learn
You can try using:
SUM(Value('YourTable'[FlagColumn]))
Hope this helps!
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

6 REPLIES 6
v-sdhruv
Community Support
Community Support

Hi @stoppm ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @stoppm ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @stoppm ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @stoppm ,
The error message "Parameter is not the correct type" in Power BI Desktop can occur when the data type of the column is not compatible with the expected data type. To resolve this issue, ensure that the column being used is an integer data type. You can use VALUE() function to convert the data type of the column to an integer. 
VALUE function (DAX) - DAX | Microsoft Learn
You can try using:
SUM(Value('YourTable'[FlagColumn]))
Hope this helps!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

anilelmastasi
Super User
Super User

Hello @stoppm ,

 

Could you please try this:

 

MeasureFlag =
IF(
SELECTEDVALUE(SlicerTable[TimePeriod]) = "day",
CALCULATE(
SUM('YourTable'[FlagColumn]),
'YourTable'[FlagColumn] = 1
),
BLANK()
)

I'm trying your solution but when I try the SUM('YourTable'[FlagColumn]) part, I get 'Parameter is not the correct type.'

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors