Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Please refer below details i need the help to count only positive value excluding 0. in total i need to need count of if can anybody help me on this.
Distributor Name | Sub Dealer Name | YTD-2024 | label_1 |
A | AA | 1 | 1 |
B | AA | -1 | 0 |
C | Bc | 2 | 2 |
D | BD | -1 | 1 |
E | SD | -1 | 1 |
F | FE | -1 | 1 |
Total | -1 | 6 |
@Anil_Babu_Samineni Sum(If(Year(smonth)='2024',Sale)) this expression which i have used to calculate measure.
im trying using count but still it showing the count for number 2 as 2 only i need to count if wherever the numbers >1 should be count as 1 only.
@stou In general such operations, I recommend to use in script and the same flags can leverage into Set analysis. Anyway, for now I guess this might work. If this is not working, Do you have sample test file to check for the same?
Count(Aggr(Sum(If(Year(smonth)='2024',Sale))>0, [Distributor Name]))
And then, check the box suppress null value in data handling section from properties of the object in case you just want to show only that is >0.
@Anil_Babu_Samineni no its not working can you write the script function for that.
@stou How about this?
=Count({$<[YTD-2024] = {">0"}>} [YTD-2024])
@stou I appreciate if you can share sample QVF to test with both cases.
@Anil_Babu_Samineni sorry but im unable to share it
try below
Sum(Aggr(if(Sum(If(Year(smonth)='2024',Sale))>0,1,0),Distributor_Name,Sub_Dealer_Name))
Regards,
Prashant Sangle
Thanks @PrashantSangle its work fine