The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I am new to Power BI and want to write a calculation using following columns
Quantity on hand , Po on order and YTD average sales and Shipping Date which are direct column from table.
The calculation should work like
If shipping date in data set is not null, then calculation should be:
Else the calculation should be:
Also if Quantity on hand, Po on order and YTD average sales is null then Cal=0
I am unable to get null function in this calculation.
Any suggestions what am i missing.
Solved! Go to Solution.
@Anonymous ,
check if this code helps or not,
Cal =
SWITCH (
TRUE (),
'Table'[Shipping Date] <> BLANK (), 'Table'[Quantity on hand] + 'Table'[YTD average sales],
'Table'[Quantity on hand] = BLANK ()
|| 'Table'[Po on order] = BLANK ()
|| 'Table'[YTD average sales] = BLANK (), 0,
'Table'[Quantity on hand] + 'Table'[YTD average sales]
)
Thanks,
Arul
@Anonymous ,
check if this code helps or not,
Cal =
SWITCH (
TRUE (),
'Table'[Shipping Date] <> BLANK (), 'Table'[Quantity on hand] + 'Table'[YTD average sales],
'Table'[Quantity on hand] = BLANK ()
|| 'Table'[Po on order] = BLANK ()
|| 'Table'[YTD average sales] = BLANK (), 0,
'Table'[Quantity on hand] + 'Table'[YTD average sales]
)
Thanks,
Arul
User | Count |
---|---|
69 | |
64 | |
63 | |
54 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
43 |