Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello all,
I have allready posted the start of my problem on this forum.
For the biggest part my problem is solved, but the last piece is still missing.
I have a filter which is showing in a visual column chart the counts of "loadings" and "unloadings".
The loadings are showing correct.
But the unloadings does not showing the correct counts.
First i need the filter on the distinct ordernumbers of the filtered date.
Then i need the counts "Ja" of the unloadings.
But the counts of unloading are not wright.
When i have a loading and unloading on 1 same day, The unloadings are not counted.
For this example, i miss 2 counts of unloading orders for the 26th.
Solved! Go to Solution.
Hi,
I am not sure of why that is happening. As a side note, you may simplify and shorten your formula to
Unieke telling Lossing = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),'tblOrderOverzicht'[Lossing]= "Ja",USERELATIONSHIP(tblOrderOverzicht[Los Datum],'tblDatum'[Datum]))
Hello all,
Unfortunatly i was too fast happy with the solution.
But sometimes the values still are not correct counted.
If i am using the date filter, and select the whole week 22 my data column says 15 unloadings on 1 June, while tmy visual only displays 13 unloadings.
15 orders/unloading actions are in the data sheet.
Just 13 showed in the visual.
What i do see, is that if i am only selecting June the 1st, so not a whole week, my visual says 6 unloading.
I think this has to do with, that's the formula is also looking at the loading date.
I have 5 blanks (These are only unloadings)
and 1 loading on 1 June(the selcted date).
I made the measure:
What do i mis?
#@##$$%
Hi,
I am not sure of why that is happening. As a side note, you may simplify and shorten your formula to
Unieke telling Lossing = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),'tblOrderOverzicht'[Lossing]= "Ja",USERELATIONSHIP(tblOrderOverzicht[Los Datum],'tblDatum'[Datum]))
Good morning,
Thanl you VERY much for thid TIP.
I sumplifyd the formaula and now it is working correct.
SUPER!!!
Gr Alfons
You are welcome.
Hi @Ashish_Mathur ,
I'm just posting since I'm also interested in why the two calculations are giving different outputs.
The FILTER() statement has to interact with the USERELATIONSHIP condition in some way that i don't quite understand.
If you manage to figure something out related to this, please let me know!
CALCULATE(DISTINCTCOUNT('Table'[Column]),FILTER('Table','Table'[Condition]= "Ja"),USERELATIONSHIP('Calendar'[Datum],'Table'[Datum]))
CALCULATE(DISTINCTCOUNT('Table'[Column]),'Table'[Condition]="Ja",USERELATIONSHIP('Calendar'[Datum],'Table'[Datum]))
Br,
J
Hi,
I use a FILTER() function in 1 of the following situations:
Since ours is a case of a simple filter (comparing a column to a fixed value), the FILTER() function is not required.
User | Count |
---|---|
98 | |
76 | |
69 | |
53 | |
27 |