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
pratikg
Regular Visitor

Apply discount to single product category,sub-category and keep the rest as is

I have product category (say 10 unique), product sub-category(say 5 per category), product price. I have created slicer dropdown for the user to select a category and sub-category, and a what-if parameter to select a particular discount they want to apply. I want to calculate the discounted price as a column where the discount is to be applied to only to user selected category and sub-category, not all products. 

2 REPLIES 2
Anonymous
Not applicable

Hi @pratikg 

It will be easier if you provide some sample data (That can be copied and pasted).

Including the expected results, what was done, whats not working, etc.

Cheers!
A

Hi @Anonymous ,

So consider 2 tables CloseCodes_Lookup connected to FinOps_Data (1:M) using a key. I want to find out Finops_Data[TTR_Hours]*(1-Improvement[Improvement Value]/100) for a specific L2 (a measure) and Finops_Data[TTR_Hours] for rest of L2 values.

 

TTR_Hr_Imp = 
VAR L2 = [Measure_L2]
RETURN
CALCULATE(SUMX(Finops_Data,Finops_Data[TTR_Hours]*(1-Improvement[Improvement Value]/100)),CloseCodes_Lookup[L2]=L2) << This L2 is a measure>>

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.