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.
This measure:
Number of cases =
VAR MinDato = MIN(DimDato[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(FactArvesager[ArvesagsKey]),
FactArvesager[Forventet afsluttet Dato] >= MinDato &&
FactArvesager[Bostarts Dato] < MinDato &&
(FactArvesager[Realiseretarv Dato] = BLANK() || FactArvesager[Realiseretarv Dato] >= MinDato)
)
is not working as intented because of the VAR part.
The Variable is calculated in context to each row. So instead of the variable being fixed to the minimum value of my date filter:
it is somehow being calculated pr. row.
I need the measure to calculated from the VAR being = 01-04-2022 and if I change the filter to another date it will change to that accordingly.
For now my only solution is to dublicate my date dimension and have that seperated. But that makes the model difficult for users to understand.
@Bokazoit , if DimDato is joined
Number of cases =
VAR MinDato = MIN(DimDato[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(FactArvesager[ArvesagsKey]),filter( FactArvesager ,
FactArvesager[Forventet afsluttet Dato] >= MinDato &&
FactArvesager[Bostarts Dato] < MinDato &&
(FactArvesager[Realiseretarv Dato] = BLANK() || FactArvesager[Realiseretarv Dato] >= MinDato),
all(DimDato)
))
That does not work. The MIN(DimDato[Date]) seems calculated per row. I seems to have a difficult time explaining my issue. I have this thread that explains it deeper:
User | Count |
---|---|
73 | |
70 | |
38 | |
24 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
41 | |
40 |