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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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