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 August 31st. Request your voucher.
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:
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
51 | |
51 | |
46 |