Forum Discussion
Double Filter, on visual column chart
Hello All,
I am pretty new with Power BI, but i am pretty far with my overview.
But for now, i have an issue wherefor i can't find the solution.
I will have a "column chart" visual where i can see on a specific date filter te discounts of ordernumber.
These ordernumber are my roadttrips.
1 order can be:
-a single loading
-a single unloading
-a loading and unloading
So when i filter on the action date of the ordernumber, my "column chart" shows me for the filtered date:
-all the loadings (this is correct)
-all the unloadings(This is NOT correct, because it counts also the unloadings from another day. These are the ones who i will not see on my visual)
I have the next date colums:
-an order date (Ordernr)
-a loading date (Laad Datum)
-an unloading date (Los datum)
The only thing that i could find was the code below.
Unfortunatly, this doesnt'work for me.
Do you guys have any suggestion?
Thank you...
Gr Alfons
- Anonymous5 years ago
Hello,
It's working,
I only changes the formule a bit.
Unieke telling Lading = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),FILTER('tblOrderOverzicht','tblOrderOverzicht'[Lading]= "Ja"),USERELATIONSHIP('tblDatum'[Datum],tblOrderOverzicht[Laad Datum]))Unieke telling Lossing = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),FILTER('tblOrderOverzicht','tblOrderOverzicht'[Lossing]= "Ja"),USERELATIONSHIP('tblDatum'[Datum],tblOrderOverzicht[Los Datum]))Unieke telling Orders = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),USERELATIONSHIP('tblDatum'[Datum],tblOrderOverzicht[ActieDatum]))Thank you very much.
Enjoy your evening!
Gr Alfons
8 Replies
- tex628
Community Champion
Hi,
It looks like you're already half way there. You need 3 different measures, each using a different date relationship.
Something like this:Measure = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),FILTER('tblOrderOverzicht','tblOrderOverzicht'[Lossing]= "Ja"),USERELATIONSHIP(tblOrderOverzicht[Loading date],tblDatum[Datum]|)) Measure 2 = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),FILTER('tblOrderOverzicht','tblOrderOverzicht'[Lossing]= "Ja"),USERELATIONSHIP(tblOrderOverzicht[UnLoading date],tblDatum[Datum]|)) Measure 3 = CALCULATE(DISTINCTCOUNT(tblOrderOverzicht[Ordernr]),FILTER('tblOrderOverzicht','tblOrderOverzicht'[Lossing]= "Ja"),USERELATIONSHIP(tblOrderOverzicht[Order Date],tblDatum[Datum]|))
Br,
J - AnonymousNot applicable
Hello J,
Thanks for your fast response.
I have made the 3 measures. But when i swipe them on the "column chart" the visual doesn't show me the pictures.
Do you have any idea?
I was thinking of a hierarchy, but you problably don't have them with measures.
🤔
Gr Alfons
- tex628
Community Champion
Can you let me know what the error message says?
Br,
J- AnonymousNot applicable
Hai,
When i saw the text, i saw the problem.
I solved this and now i can see the pictures.
The counting is not right for this moment, but i will try to find out first.
I will let you know when it works.
Thank you for this support...
Gr