The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I want to be able to output a specific value in a new created column but based off what is entered as the date and category type.
For example I need all these to apply:
I need to output these values in a new column based off the data entered is within a specific month and falls under a category type.
Output "226.98" in [New Column] if date entered is before August 2024 [Date column] and if Category [2nd column] is in "Assy".
Output "220.98" if date is after August 2024 and if Category is in "Assy".
Output "94.016" if date is before August 2024 and if Category is in "Mach".
Output "92.004" if date is after August 2024 and if Category is in "Mach".
Tried using the Conditional Column feature on Transform data, but I couldn't get it to work.
Any help is appreciate.
Thanks!
Solved! Go to Solution.
Nevermind. I figured it out. I added some code to the condition column too to refine my boundaries of date I wanted to capture and output specific values. Added some "else if" and "and" functions.
Nevermind. I figured it out. I added some code to the condition column too to refine my boundaries of date I wanted to capture and output specific values. Added some "else if" and "and" functions.
hi @jkd0007 ,
kindly provide the sample input in a table format.
Regardless, you could try:
1. unpivoting the data. ( Months as attributes (in a date format) with values).
2. then try with the calculated column conditions: if month <= August 2024 ( date format) , then value else null.
Using the method you mentioned above does not consider the other category type if it being Assy or Mach.
I used the method you mentioned before with the conditional columns, and yes it works if it was affected by 1 conditon (date), but I also have another condition (category column) to take into consideration for that output .
Example below.
Items in grey is what I need to output.
The 1st two columns are data that's been entered and populated as an example.