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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HS_PDS
Frequent Visitor

Slicer Parameter to count measures

I want to create a parameter that a slicer passes to measures, which in then perform counts.

 

Basically I have a few metrics and want to count in a column which fall under a certain threshold (which is passed thru slicer)

 

Here is an example:

 

I have three metrics and column which counts if metric is under threshold. These are then totaled in the fires column. 

 

For example the first row has one metric under 40% so would calculate as 1 fire

Threshold Example.jpg

I havent figured out the threshold bit any help is appreciated.

Is this even possible? Let me know if I'm not clear or you need more examples/ clarification 

 

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @HS_PDS 

Create what-if parameter and creat measures

Metric1_cnt = IF(MAX('Table'[Metric1])<[Parameter Value],1,0)

Metric2_cnt = IF(MAX('Table'[Metric2])<[Parameter Value],1,0)

Metric3_cnt = IF(MAX('Table'[Metric3])<[Parameter Value],1,0)

Capture6.JPGCapture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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
v-juanli-msft
Community Support
Community Support

Hi @HS_PDS 

Create what-if parameter and creat measures

Metric1_cnt = IF(MAX('Table'[Metric1])<[Parameter Value],1,0)

Metric2_cnt = IF(MAX('Table'[Metric2])<[Parameter Value],1,0)

Metric3_cnt = IF(MAX('Table'[Metric3])<[Parameter Value],1,0)

Capture6.JPGCapture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft   Thank you for the work-around , This worked beautifully! 

mussaenda
Super User
Super User

Hi @HS_PDS ,

 

you can create a parameter. you can find it in modeling tab, Create parameter.

 

If you need more help, provide a sample data that can be copied and show your desired output when a parameter is used.

Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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