Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all, i have a problem, i have a table in which i have my Customer and the Open Balances which i have with this customer. I also have a slicer with a trader which is the people which traded that money with this customer.
I want when i filter the slicer to see all the Customers which are related to this Trader, but in the Balance i want to see the whole amount for the customers and not the amount which came from this Trader.
In my example you will find in the .pbix Trader B had trade only 5 euro with Deloitte and Trader C 256. When i filter Trader B i want to see Deloitte since is a customer of Trader B and i want to see a summarized amount i.e 261.
If I use the ALL funciton the number is correct but my filter is now working, It doesn't filter at all the table.
Thank you.
https://drive.google.com/file/d/1sWZLMCH8Cg56jA_orYmuIr-eB6GOSJ9Y/view?usp=sharing
Solved! Go to Solution.
Hi @pbi1908 ,
I suggest you to try code as below.
Measure 2 =
VAR _MEASURE =
CALCULATE ( SUM ( BALANCE[BALANCES] ), ALL ( TRADER_ID[NAME] ) )
RETURN
IF ( ISBLANK ( CALCULATE ( SUM ( BALANCE[BALANCES] ) ) ), BLANK (), _MEASURE )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That works thank you very much. Can you explain a bit the logic behind it ?
As far as i understood you tried this because the measure will be never blank but how it gets filtered from the traders ?
Hi @pbi1908 ,
Here I just add a IF function, it will check whether the filter sum will return blank, if blank the measure will return blank directly.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hmm okk thanks @v-rzhou-msft , last question .
What if i add another one component like in the updated .pbix, so i have also the Payment Terms which coming from another dimension table which is connected with the balances so they are getting filtered from Traders as well.
What i want is still to see the, the customers of a Trader and the all the payment terms of this trader with the overall balance.
https://drive.google.com/file/d/1aLUA2OnPc2qebgv4c98k9rcF-xZfiY-o/view?usp=sharing
Hi @pbi1908 ,
I suggest you to try code as below.
Measure 2 =
VAR _MEASURE =
CALCULATE ( SUM ( BALANCE[BALANCES] ), ALL ( TRADER_ID[NAME] ) )
RETURN
IF ( ISBLANK ( CALCULATE ( SUM ( BALANCE[BALANCES] ) ) ), BLANK (), _MEASURE )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |