Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to calculate the sum of revenue for 2022 of a all products given that they have sales in a given periode (after 30.06.2022).
That is measure [Price 30.06] is not blank or 0.
The following is my attempt:
IF([Price 30.06] <> blank() || [Price 30.06]<>0, calculate([Revenue], Dates[Year]==2022, ALL(Products_table))
However, the all() formula seems to ignore the IF() command, and adds all products for the period.
Price 30.06 = calculated price after 30.06 // sum(DF_table(revenue)/sum(DF_table(quantity))
Revenue = sum(DF_table(revenue))
Products_table is connected to DF_table by item_id
Dates is connected to DF_table by dates column
Solved! Go to Solution.
Apologies, part of my inital syntax was incorrect, what solved it was the following:
Apologies, part of my inital syntax was incorrect, what solved it was the following:
(after and including 2 Jan)
Regards,
Ritesh
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |