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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
tkavitha911
Helper III
Helper III

How to create a table by using DAX for jan month top 5 each channel top 5 spgrs by taking abs value

input data 

 

tkavitha911_1-1709548023120.png

 Out put i want to display like this 

tkavitha911_2-1709548084198.png

 

10 REPLIES 10
tkavitha911
Helper III
Helper III

first i want to sort top 5 by focusing the abs value of january month, and second requirement will be that top 5 spgrs i want to dispaly for comparision perpose sep 2023 to jan 2024. like this by using matrix table 

 

 

tkavitha911_0-1709634185594.png

 

talespin
Solution Sage
Solution Sage

hi @tkavitha911 

 

I want to display data for the month of January - What is the logic, current month/previous month

which month?

tkavitha911
Helper III
Helper III

I want to display data for the month of January, focusing on absolute values, and the M-3 Accuracy(Nivea

percentage from September 2023 to January 2024. While I can currently display data for January alone, I specifically want to view only the absolute values for that month. 

 

talespin
Solution Sage
Solution Sage

hi @tkavitha911 

 

You can use a measure to RANK and filter data from Filter pane, but there must be some logic to make it dynamic(which month data you want to see?)

Rank =
 RANK(DENSE, ALLSELECTED('Rank'), ORDERBY('Rank'[abs], DESC), PARTITIONBY('Rank'[CHANNEL]))
 
talespin_0-1709624616395.png

 

Anonymous
Not applicable

Hi @tkavitha911 ,

You can create a computing table to get the top five ABS among each CHANNEL.

Top5spgr =
Var RANKEDSPGR = Addcolumns (
'Table',
"RANK", RANKX (Filter (all ('table'), 'table' [channel] = Earlier ('table' [chaannel])), [abs], desc, dense)
Cure
Return
SelectColumns (
Filter (
RANKEDSPGR,
[Rank] <= 5
),,
"Channel", [Channel],
"Spgr", [spgr realinged],
"Period", [Period],
"Accuracy", [M-3 account (nivea)],],
"ABS", [ABS]
)

 

But I don't quite understand the percentage of the SPGR you said. It refers to who compares and who, which helps me better help you solve the problem.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Heare i want to show top 5 for jamuary month 

 

heare i want to display january 2024 month for each channel top 5 spgr's by using the abs value heare no need to display accuracy nivea. (that is just for adding the values for different months in a visual)  

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

CHANNELSPGR RealingedPeriodM-3 Accuracy(Nivea)abs
GT8010101-11-20230.3302420380
GT8905901-11-20230.782095292452
MT8905401-11-20230.587362275705
MT8020401-11-20230.591634266189
MT8010201-11-20230.467382251847
GT8528101-12-20230189464
MT8020401-12-20230.482066177962.7
GT89053-1101-11-20230175798
GT8905901-12-20230.308602163544
GT8528101-11-20230.468827140501
GT8020501-12-20230.662918137774
GT8883501-01-20240137513.7
MT8010101-11-20230.435667132573
MT8160001-12-20230.104130830.3
GT8528201-12-20230130336
GT8905401-01-20240.547036126425.4
MT8020401-01-20240123852
GT8020101-11-20230.80208123661
GT8020501-01-20240.269625119651.4
GT8020401-11-20230.517204116502
GT8905301-11-20230.776534115515
GT8384001-11-20230.63675114645
MT8010201-12-20230.41620997904.11
GT8905401-12-20230.85322593179
MT8905001-11-20230.5345887989
GT8840801-11-20230.61133286263
GT8160001-01-20240.30863284340
GT8020101-01-2024084168.07
GT8225201-01-2024083918.05
GT8905001-11-20230.68621181200
GT8905301-12-20230.62721580151
MT8507701-11-20230.30114579984
GT8020401-01-2024076600.52
MT8578101-12-20230.52018972678.93
GT8373401-12-20230.42454469743
MT8280801-01-2024069461.55
GT8020501-11-20230.96231468829
GT8010101-12-20230.72400967971
GT8741401-11-20230.581465994
MT8847601-11-20230.7842265920
MT8840901-11-20230.43760765363
GT8905001-01-2024063715.01
GT8373101-01-20240.39101162983.44
GT8280801-01-2024062538.59
GT8014001-11-20230.28450259767
GT89053-1101-12-2023059538
GT8740001-01-2024057841
GT8030501-11-20230.6495457813
GT8160101-01-20240.33955557573
GT8886801-01-2024056768.93

this is my sample data i want to write a dax for table creating for each channel top 5 SPGR's based on abs value then i want to display for each spgr accuracy percentage pls help me guys 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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