Forum Discussion
IF ELSE for DATE
- Anonymous5 years ago
Hi Anonymous ,
You can create a new table as follows, this table does not create any relationship with the main table.
In my main table, today in your formula I took the fixed date October 20, 2021.
Now create the measure as
Component Code = SWITCH ( MAX ( 'Table'[SSD] ), "Backlog", CALCULATE ( SUM ( 'Open Orders_BOM'[Component Code] ), FILTER ( 'Open Orders_BOM', [SSD] IN { "Backlog", "N5D", "Today" } ) ), "Today", CALCULATE ( SUM ( 'Open Orders_BOM'[Component Code] ), FILTER ( 'Open Orders_BOM', [SSD] IN { "Backlog", "Today" } ) ), "Future", CALCULATE ( SUM ( 'Open Orders_BOM'[Component Code] ), FILTER ( 'Open Orders_BOM', [SSD] = "Future" ) ) )Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Anonymous ,
do you want to add a new measure or a new calculated column?
The code you posted would only work with a calculated column.
Where exactly are you struggling or what is your question?
Best regards
Denis
selimovd i would like to add it as a calculated column if that is the only way it works.
So for my DESIRED OUTPUT:
| SSD | Component Code |
| Backlog | 4180 |
| Today | 2326 |
| Future | 36740 |
- selimovd5 years ago
Most Valuable Professional
Anonymous if you want a new column that in categorizing into Backlog, Today, N5D and Future depending on the value of the column 'Open Orders_BOM'[SCHEDULE_SHIP_DATE], then that's the way to go.
Then my question is where are you struggling?