The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |