The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi guys,
Hoping someone could lend a hand converting the following excel formula for PowerBI.
=IF(D2="LAP",IF(COUNTIFS(G:G,G2,E:E,E2,B:B,B2,A:A,A2,C:C,SUM(C2-1))>0,(SUMIFS(F:F,G:G,G2,E:E,E2,B:B,B2,A:A,A2,C:C,SUM(C2-1))),0),0)
A here's a screenshot of the table with the formula producing the desired result:
The formula in question is in column H.
The outcome to be achieved is:
If a row with 'LAP' in column D is found, it returns the value (column F) from the row that contains the same client (column G), the same service type (column E), the same Month (column B), the same day (column A) but the year (column C) is the previous one to the one in the row with 'LAP'. If it doesn't detect 'LAP' in the given row, it always defaults to 0.
As such, the far right column in the table has just the one row with LAP showing £2000, which is sourced from the value located 4 rows above and 2 columns to the left.
Every Dax formula I have tried has so far has failed to the extent they probably aren't a helpful starting point for troubleshooting. AI converters have also failed just as miserably in tackling this one - proof the machines aren't taking over just yet xD
Any assistance in this would be hugely appreciated!
Cheers,
RETJF
@RETJF You can find equivalent DAX here: Excel to DAX Translation - Microsoft Fabric Community
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
264 | |
120 | |
115 | |
83 | |
70 |