Forum Discussion
Why my GP% table only display 1st column only ?
Hi All
Below expression is work well for Table 1 sales:-
Below expression is work well for Table 2 Cost:-
I try to create expression below for GP% :-
The above table is problem , because it only display first column GP% , the 2nd and 3 th column missing.
PBI sample file :-
https://www.dropbox.com/s/jgwxjq2dgi7908b/DATA_TI_TA_CLASS%20TABLE%20GP%20PERCNTAGE.pbix?dl=0
Paul
In that case you will have to apply the filter based on the purchase and not according to percentage as it will alwas be less than 50000.
Something like this:
_Segment GP_SGD = CALCULATE([SALES GP%],FILTER(ADDCOLUMNS(VALUES(SALES[Customer Name]),"ABCD",CALCULATE(divide(Sum(SALES[sales]),'RATE'[_rate]),CALCULATETABLE(VALUES(SALES[Customer Name])))),COUNTROWS(FILTER(Brackets,[abcd]>=Brackets[ Lower ]&&[ABCD]<=Brackets[ Upper ]))>0))See if it gives you the desired result
4 Replies
- PC2790
Community Champion
Isn't that because of the nature of the data?
All the values of Sales GP% is in the bracket of <=50000 and hence the values are appearing to be as expected.
See this:
- admin11
Memorable Member
Thank you for your sharing. appreciate very much.
But i have customer who purchase are >50K , i like to know what is the GP% , as you notice that Table 1 and 2 both can display 3 column data.
- PC2790
Community Champion
In that case you will have to apply the filter based on the purchase and not according to percentage as it will alwas be less than 50000.
Something like this:
_Segment GP_SGD = CALCULATE([SALES GP%],FILTER(ADDCOLUMNS(VALUES(SALES[Customer Name]),"ABCD",CALCULATE(divide(Sum(SALES[sales]),'RATE'[_rate]),CALCULATETABLE(VALUES(SALES[Customer Name])))),COUNTROWS(FILTER(Brackets,[abcd]>=Brackets[ Lower ]&&[ABCD]<=Brackets[ Upper ]))>0))See if it gives you the desired result