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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.