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 September 15. Request your voucher.
Hello friends,
can you guys please help me understanding why my measure is not completing correctly per month, the cumulative way is doing correctly, the problem is that is not replicating the value from the previous month when there's not a record in that month.
conteo =
CALCULATE(
COUNTA('data'[Nombre certificación]),
'data'[Nombre certificación] IN {
"Databricks Certified Associate Developer for Apache Spark 3.0",
"Databricks Certified Data Engineer Associate",
"Databricks Certified Data Analyst Associate"
},
FILTER(
CALCULATETABLE(
SUMMARIZE(
'data',
data[Nombre certificación]
)
),
ISONORAFTER(
'data'[Nombre certificación], 'data'[Nombre certificación], ASC
)
),
ALL ( 'data' ),
data[Fecha] <= MAX ( 'data'[Fecha] )
)
The one that gives me the following result:
but my expected result should be:
I don't have that much experiencie working with DAX calculation and I don't have that clear what my problem couldbe.
any recommendation please.
Solved! Go to Solution.
hi @Jonaae
For the months with no data, it supposed to return BLANK.
If you insist, try to
1) create a date table like this:
3) plot the Matrix Visual with the DateTable[Date] and a measure like this:
RunningTotal =
VAR _date = MAX(DateTable[Date])
RETURN
CALCULATE(
SUM(data[qty]),
FILTER(
ALL(DateTable[Date]),
DateTable[date]<=_date
)
)
it shall work like this:
sample dataset:
hi @Jonaae
what do you get if you try like:
Hello @FreemanZ thanks for your answer.
This is what I get with your recommendation:
It's not getting them acumulatevely per year and month ( Jan-23) and still not considering the months where there are no records.
hi @Jonaae
For the months with no data, it supposed to return BLANK.
If you insist, try to
1) create a date table like this:
3) plot the Matrix Visual with the DateTable[Date] and a measure like this:
RunningTotal =
VAR _date = MAX(DateTable[Date])
RETURN
CALCULATE(
SUM(data[qty]),
FILTER(
ALL(DateTable[Date]),
DateTable[date]<=_date
)
)
it shall work like this:
sample dataset:
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
13 | |
8 | |
5 |