Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have the following scenario
The Price Column is the result of the following calculation
Price = DIVIDE(sum('Entrada Oferta'[Net value]),sum('Entrada Oferta'[Qt.Total OV]),BLANK())
However, as you can see, there is some days where I didnt sell products (so this calculation will bring zero), for those days, I would like the Price assume the value of the average Price for the whole month. How can I solve it?
Thanks in advance
Solved! Go to Solution.
Price = DIVIDE(sum('Entrada Oferta'[Net value]),sum('Entrada Oferta'[Qt.Total OV]),VAR _y=values(dates[year]) VAR _m=values(dates[month]) RETURN CALCULATE(DIVIDE(sum('Entrada Oferta'[Net value]),sum('Entrada Oferta'[Qt.Total OV]),dates[year] IN _y,dates[month] IN _m,ALL(dates)))
Price = DIVIDE(sum('Entrada Oferta'[Net value]),sum('Entrada Oferta'[Qt.Total OV]),VAR _y=values(dates[year]) VAR _m=values(dates[month]) RETURN CALCULATE(DIVIDE(sum('Entrada Oferta'[Net value]),sum('Entrada Oferta'[Qt.Total OV]),dates[year] IN _y,dates[month] IN _m,ALL(dates)))
Use COALESCE()
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |