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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NelsonPay
Regular Visitor

How to create a conditional

Good afternoon,

 

I have the following table

NelsonPay_0-1675285286376.png

I want to create a conditional in which if the total approved amount is more than 50 and is Dinner subtract 50(day limit dinner) if the value is less keep it 0 and if the total is more than 30 and is luch subtract 30(day limit luch) if the total is less kee ipt 0. I have the following formula:

 

IF('Global Meals'[Total Approved Amount USD]>=0.1,IF('Global Meals'[Total Approved Amount USD]>=20,'Global Meals'[Total Approved Amount USD]-[Day Limit Breakfast],IF('Global Meals'[Total Approved Amount USD]>=30,'Global Meals'[Total Approved Amount USD]-[Day Limit Luch],IF('Global Meals'[Total Approved Amount USD]>=50,'Global Meals'[Total Approved Amount USD]-[Day Limit Dinner],IF('Global Meals'[Total Approved Amount USD]>=10,'Global Meals'[Total Approved Amount USD]-[Day Limit Snacks],0)))))
 
How can calculate in a way each formula can be with each subtype.
 
Best regards,
Nelson Pay
1 REPLY 1
markeymark25
Regular Visitor

I would create a conditional column under "Add Column" in Power Query Editor.  

 

There you can spell out your conditions. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.