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.
Hello everyone,
I'm coming to you because I need help with a measure that refers to other measures.
In this table, the first column, "StatutVar", is a measurement that SuperUser @tamerj1 helped me to make, thanks to him.
From this StatusVar measurement a second one is created, "bo_dossier_...".
Finally, the middle column is a distinctCount on a column when the measure "bo_dossier-..." = true. As you can see, there are rows where the bo_dossier is false and I have 2s when I should have nothing. Can you please help me?
Here are my measures:
StatutVar:=
VAR CurrentIDTable =
CALCULATETABLE ( DISTINCT ( GESTION[C_STATUT_DOSSIER]), ALLSELECTED() ,VALUES ( GESTION[ID_DOSSIER]) )
RETURN
IF(
--NOT ISEMPTY ( Gestion ) &&
ISEMPTY ( EXCEPT ( { "ANNULE" }, CurrentIDTable ) ) ,
IF (
NOT ISEMPTY ( INTERSECT ( { "ACCEPTE", "PAYE" }, CurrentIDTable ) ),
1,
BLANK()
),
BLANK()
)
bo_dossier_servi_num agent mesure:=IF(ISBLANK([StatutVar])= true,VALUES(GESTION[BO_DOSSIER_SERVI]),FALSE)
Variable agents servis:= CALCULATE((DISTINCTCOUNT(GESTION[C_NUM_AGENT])),FILTER(GESTION,[bo_dossier_servi_num agent mesure]=true))+CALCULATE(CALCULATE(DISTINCTCOUNT(GESTION[C_NUM_CONJOINT]),GESTION[C_NUM_CONJOINT]<>BLANK()),FILTER(GESTION,[bo_dossier_servi_num agent mesure]=true))
When I use this measure I get the right lines, but I no longer have a total result. I should have 2 in total result here :
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
13 | |
12 | |
10 | |
6 |