Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Together,
I am using the below expression which unfortunately does not work:
=Count(aggr(only(distinct
{<[Load Date]={"FY24*"},Product={"Bike"},[Colour]-={Yellow,Green},Serialnumber-={"50*"},[Price]-={"1.999"}>}
Productname)
& only(distinct
{<[Load Date]={"FY25*"},Product={"Bike"},[Colour]={Yellow,Green},Serialnumber-={"50*"},[Price]-={"1.999"}>}
Productname),Productname))
I want to count the bike colour yellow and green only in Year 25.
I am happy to hear any suggestions.
Kind Regards,
Daniel
try:
Count(distinct{$<[Load Date]={'*25*'}, Product={'Bike'}, [Colour]={'Yellow','Green'}>}Product)
Demo:
Data:
Load * Inline [
LoadDate, Product, Colour, SerialNumber
FY24, Bike, Green,5012
FY24, Bike, Yellow,5012
FY24, Car, Red,6015
FY24, Car, Green,6015
FY25, Car, White,6015
FY25, Bike, Yellow,5012
FY25, Bike, Yellow,5015
FY25, Bike, Yellow,5016
FY25, Bike, Green,5012
FY25, Bike, Black,5012
FY25, Bike, Green,5015
FY25, Bike, Green,7015
];
Expression: = Count( {$<LoadDate={'*25*'}, Product={'Bike'}, Colour={'Yellow', 'Green'}, SerialNumber={'50*'}>}Product)
output: 5
Thanks for your reply.
But there is missing the counting for FY24, which does not work with the "& only function".
Any further ideas?
Kind Regards,
Daniel
@Daniel1908 share sample data with expected output
Input Data:
Load Date | Product | Colour | Serialnumber | Price |
FY24 | Bike | Yellow | 667 | $ 2.199,00 |
FY24 | Bike | Green | 602 | $ 2.199,00 |
FY24 | Scooter | Black | 449 | $ 1.999,00 |
FY24 | Scooter | Blue | 581 | $ 1.999,00 |
FY24 | Scooter | Green | 376 | $ 2.199,00 |
FY24 | Bike | Black | 455 | $ 2.199,00 |
FY24 | Bike | Green | 452 | $ 2.199,00 |
FY24 | Bike | Blue | 801 | $ 2.199,00 |
FY24 | Bike | Yellow | 321 | $ 2.199,00 |
FY25 | Bike | Yellow | 571 | $ 2.199,00 |
FY25 | Bike | Yellow | 442 | $ 2.199,00 |
FY25 | Bike | Yellow | 453 | $ 2.199,00 |
FY25 | Bike | Green | 632 | $ 2.199,00 |
FY25 | Bike | Green | 798 | $ 2.199,00 |
FY25 | Bike | Green | 854 | $ 2.199,00 |
FY25 | Scooter | Green | 652 | $ 1.999,00 |
FY25 | Scooter | Yellow | 742 | $ 1.999,00 |
FY25 | Scooter | Blue | 213 | $ 2.199,00 |
FY25 | Bike | Black | 965 | $ 2.199,00 |
FY25 | Bike | Blue | 412 | $ 2.199,00 |
FY25 | Bike | Black | 589 | $ 2.199,00 |
Output should be:
Bike FY24 = 2 |
Bike FY25 = 7 |
Kind Regards,
Daniel
when you say 'I want to count the bike colour yellow and green' - there are 4(2 Yellow, 2 Green) bikes in FY24 and 6(3Yellow, 3 Green) Bikes in FY25, how did you get
Bike FY24 = 2 |
Bike FY25 = 7 |
what are the other conditions?
Hi Qrishna,
for FY24 I do not want to yount Bike = Yellow & Green but all other Bikes (except Serialnumber ="50*" or Price = "1.999")
For FY24:
Load Date | Product | Colour | Serialnumber | Price |
FY24 | Bike | Black | 455 | $ 2.199,00 |
FY24 | Bike | Blue | 801 | $ 2.199,00 |
In FY25 I want to count all Bikes (except Serialnumber ="50*" or Price = "1.999")
FY25:
FY25 | Bike | Yellow | 442 | $ 2.199,00 |
FY25 | Bike | Yellow | 453 | $ 2.199,00 |
FY25 | Bike | Green | 632 | $ 2.199,00 |
FY25 | Bike | Green | 798 | $ 2.199,00 |
FY25 | Bike | Green | 854 | $ 2.199,00 |
FY25 | Bike | Black | 965 | $ 2.199,00 |
FY25 | Bike | Blue | 412 | $ 2.199,00 |
Kind Regards,
Daniel