Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table sales
date | product | subproduct |
01/02/2022 | SUNDAE | SUNDAE1 |
02/02/2022 | 40/50 CL | wwwww |
05/02/2022 | SUNDAE | SUNDAE2 |
01/02/2022 | 40/50 CL | vvv |
07/03/2022 | 40/50 CL | vvv |
here's a summarized table, frequence count the number of frequence of each product exists in the table sales indepedently from date:
product | subproduct | Frequence |
SUNDAE | SUNDAE1 | 1 |
SUNDAE | SUNDAE2 | 1 |
40/50 CL | wwwww | 1 |
40/50 CL | vvv | 2 |
I need to display in chart frequence by Total, by generating GENERATESERIES ( 1, max_freq) which max is the maximum frequence
Frequence | SUNDAE1 | SUNDAE2 | wwwww | vvv | Total |
1 | 1 | 1 | 1 | 0 | 3 |
2 | 0 | 0 | 0 | 2 | 2 |
Any idea?
Solved! Go to Solution.
Hi @Anonymous ,
Sales2.
First create a new table.
Table = GENERATESERIES(1,MAX('Sales2'[Frequence]))
Table.
Please create a new measure.
Measure = IF(MAX('Sales2'[Frequence])=SELECTEDVALUE('Table'[Frequence]),MAX('Sales2'[Frequence]),0)
Result.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @Anonymous ,
Sales2.
First create a new table.
Table = GENERATESERIES(1,MAX('Sales2'[Frequence]))
Table.
Please create a new measure.
Measure = IF(MAX('Sales2'[Frequence])=SELECTEDVALUE('Table'[Frequence]),MAX('Sales2'[Frequence]),0)
Result.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous , This is the usual approch
Bucket/Segment code
measure
Measure = Count(Table[product ])
bucket = Generateseries(1,100,1)
new Measure
Countx(filter(Values(Table[product]), [Measure ] = max(bucket[Value])), [User])
use summarize for more than one column
Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ
User | Count |
---|---|
92 | |
85 | |
76 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |