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.
Hello,
I've formulas in 4 columns in Excel. And the similar logics (calculated columns) I need to create in PBI.
Below is the snap shot.
In Column D and F i.e. Sales Date 1 and Sales Date 2 I've added a formula as =TEXT(B2,"m/yyyy"). Were referene is B column.
In Column C (Sales in 20225), I've applied below formula in excel:
=IF(D2="1/2024",((A2/12)*0),IF(D2="2/2024",((A2/12)*1),IF(D2="3/2024",((A2/12)*2),IF(D2="4/2024",((A2/12)*3),IF(D2="5/2024",((A2/12)*4),IF(D2="6/2024",((A2/12)*5),IF(D2="7/2024",((A2/12)*6),IF(D2="7/2024",((A2/12)*6),IF(D2="8/2024",((A2/12)*7),IF(D2="9/2024",((A2/12)*8),IF(D2="10/2024",((A2/12)*9),IF(D2="11/2024",((A2/12)*10),IF(D2="12/2024",((A2/12)*11),IF(D2="1/2025",((A2/12)*12),IF(D2="2/2025",((A2/12)*11),IF(D2="3/2025",((A2/12)*10),IF(D2="4/2025",((A2/12)*9),IF(D2="5/2025",((A2/12)*8),IF(D2="6/2025",((A2/12)*7),IF(D2="7/2025",((A2/12)*6),IF(D2="8/2025",((A2/12)*5),IF(D2="9/2025",((A2/12)*4),IF(D2="10/2025",((A2/12)*3),IF(D2="11/2025",((A2/12)*2),IF(D2="12/2025",((A2/12)*1))))))))))))))))))))))))))
For in column E i.e. (Sales in 2026), below formula is applied:
=IF(F2="1/2025",((A2/12)*0),IF(F2="2/2025",((A2/12)*1),IF(F2="3/2025",((A2/12)*2),IF(F2="4/2025",((A2/12)*3),IF(F2="5/2025",((A2/12)*4),IF(F2="6/2025",((A2/12)*5),IF(F2="7/2025",((A2/12)*6),IF(F2="8/2025",((A2/12)*7),IF(F2="9/2025",((A2/12)*8),IF(F2="10/2025",((A2/12)*9),IF(F2="11/2025",((A2/12)*10),IF(F2="12/2025",((A2/12)*11),IF(F2="1/2026",((A2/12)*12),IF(F2="2/2026",((A2/12)*11),IF(F2="3/2026",((A2/12)*10),IF(F2="4/2026",((A2/12)*9),IF(F2="5/2026",((A2/12)*8),IF(F2="6/2026",((A2/12)*7),IF(F2="7/2026",((A2/12)*6),IF(F2="8/2026",((A2/12)*5),IF(F2="9/2026",((A2/12)*4),IF(F2="10/2026",((A2/12)*3),IF(F2="11/2026",((A2/12)*2),IF(F2="12/2026",((A2/12)*1)))))))))))))))))))))))))
Can someone advise on how can we apply above 2 logics in PBI report.
And whereever we see FALSE in the logics, return as zero
Solved! Go to Solution.
Create the "Sales Date 1" and "Sales Date 2" columns:
Proud to be a Super User! |
|
Hi @E5254730 - you can start creating calculated columns for columns as
Sales Date 1 = FORMAT('Financials'[Sales Date], "m/yyyy")
Sales Date 2 = FORMAT('Financials'[Sales Date 2], "m/yyyy")
Proud to be a Super User! | |
@rajendraongole1 @bhanu_gautam
Thanks! Rajendra and Gautam. I was able to fix the issue.
Both the logics are working as expected.
Thanks! once again.
@rajendraongole1 @bhanu_gautam
Sales Date 1 and @2 column is returning below result.
Hence Sales column is showing all zero values
Hi @E5254730 - you can start creating calculated columns for columns as
Sales Date 1 = FORMAT('Financials'[Sales Date], "m/yyyy")
Sales Date 2 = FORMAT('Financials'[Sales Date 2], "m/yyyy")
Proud to be a Super User! | |
Create the "Sales Date 1" and "Sales Date 2" columns:
Proud to be a Super User! |
|
User | Count |
---|---|
69 | |
69 | |
66 | |
55 | |
28 |
User | Count |
---|---|
112 | |
82 | |
66 | |
48 | |
43 |