Forum Discussion
Calculating Mode
- 3 years ago
jaclynt8
Note >> here is Two Solutions but useful First soutions bcoz second Solution in use duplicates table and it is Load our dataset .>> Right Click on Product Column >> Remove Duplicates >> Get Your Out-Put.
***************************************** Second Solutions ***********************************
>>Create Product Dulicates table >> Go to Dulicates table Home tab ribbon Advance Editor >> clear all M code and>>Add Below M Code.
let
Source = Product,
#"Grouped Rows" = Table.Group(Source,"Product",{"Price", each List.Mode([Price])})in
#"Grouped Rows"
here you get your expected result.If this post helps, please consider accept as solution to help other members find it more quickly.
jaclynt8
Note >> here is Two Solutions but useful First soutions bcoz second Solution in use duplicates table and it is Load our dataset .
>> Right Click on Product Column >> Remove Duplicates >> Get Your Out-Put.
***************************************** Second Solutions ***********************************
>>Create Product Dulicates table >> Go to Dulicates table Home tab ribbon Advance Editor >> clear all M code and>>Add Below M Code.
let
Source = Product,
#"Grouped Rows" = Table.Group(Source,"Product",{"Price", each List.Mode([Price])})
in
#"Grouped Rows"
here you get your expected result.
If this post helps, please consider accept as solution to help other members find it more quickly.
- jaclynt83 years agoFrequent Visitor
Thank you! I used the second solution and it worked! I was wondering what I could do if I had two values I needed to create mode out of.