Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
HI
I have seen different solutions to this issue in the forum but it seems none is working for me.
I ahve a table showing the number of projects going Live x month and the Productivity owner name
Num of projects = All projects with Same customer, same country and same Go Live date = 1 project
The formula below and using the Index column checks previous row for this requierements and shows 0 until condition is met, then 1.
I can have different projects rows but if same country/Same Date and same customer...al rows will show 0 except one row that will show 1.
I would like to show 0 when no projects are scheduled in that month instead of blank so my Target and diff formula works.
Any tip?
thanks
Hi @romovaro
You can simply add 0 to your measure or create one measure with +0 at the end.
measure= calculate----------
return result +0
I hope this might solve your issue!
HI @Uzi2019
I also treid this one but nothing:
@romovaro Yoyu can use the IF function to check for blanks and replace them with zeros
DAX
NumProjects =
IF (
OR (
OR (
'PV Cel File'[CID] <>
CALCULATE (
MAX ('PV Cel File'[CID]),
FILTER (
'PV Cel File',
'PV Cel File'[Índice] = EARLIER ('PV Cel File'[Índice])-1
)
),
'PV Cel File'[Country Long Name] <>
CALCULATE (
MAX ('PV Cel File'[Country Long Name]),
FILTER (
'PV Cel File',
'PV Cel File'[Índice] = EARLIER ('PV Cel File'[Índice])-1
)
)
),
'PV Cel File'[GLD] <>
CALCULATE (
MAX ('PV Cel File'[GLD]),
FILTER (
'PV Cel File',
'PV Cel File'[Índice] = EARLIER ('PV Cel File'[Índice])-1
)
)
),
1,
0
)
you can wrap your NumProjects measure in another IF statement to check for blanks and replace them with zeros:
DAX
NumProjectsWithZero =
IF (
ISBLANK([NumProjects]),
0,
[NumProjects]
)
Proud to be a Super User! |
|
Thanks for your quick response.
Unfortunately I get the same results and blanks.
In Excel would be similar to this:
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 |
---|---|
76 | |
75 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |