Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

displaying frequence by total

I have a table sales 

 

dateproduct subproduct 
01/02/2022SUNDAESUNDAE1
02/02/202240/50 CLwwwww
05/02/2022SUNDAESUNDAE2
01/02/202240/50 CLvvv
07/03/202240/50 CLvvv

here's a summarized table, frequence count the number of frequence of each product exists in the table sales indepedently from date: 

productsubproduct Frequence
SUNDAESUNDAE11
SUNDAESUNDAE21
40/50 CLwwwww1
40/50 CLvvv2

 

I need to display in chart frequence by Total, by generating  GENERATESERIES ( 1, max_freq) which max is the maximum frequence

FrequenceSUNDAE1SUNDAE2wwwwwvvvTotal
111103
200022

 

Any idea?

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sales2.

vcgaomsft_0-1654076143150.png

First create a new table.

Table = GENERATESERIES(1,MAX('Sales2'[Frequence]))

Table.

vcgaomsft_1-1654076192489.png

Please create a new measure.

Measure = IF(MAX('Sales2'[Frequence])=SELECTEDVALUE('Table'[Frequence]),MAX('Sales2'[Frequence]),0)

Result.

vcgaomsft_2-1654076304588.png

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

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sales2.

vcgaomsft_0-1654076143150.png

First create a new table.

Table = GENERATESERIES(1,MAX('Sales2'[Frequence]))

Table.

vcgaomsft_1-1654076192489.png

Please create a new measure.

Measure = IF(MAX('Sales2'[Frequence])=SELECTEDVALUE('Table'[Frequence]),MAX('Sales2'[Frequence]),0)

Result.

vcgaomsft_2-1654076304588.png

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

amitchandak
Super User
Super User

@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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.