Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi
i have the following data
Usage | Month Year | Name
123 | Jan 22 | Item A
124 | Jan 22 | Item B
14412 | Jan 22 | Item C
1324 | Feb 22 | Item A
12 | Feb 22 | Item B
9242 | Feb 22 | Item D
and so fourth.
The data is basically showing me the usage of all items by month. I have over 500 items each item is used every month.
I need to create a graph which shows me the the top 5 items used each month.
I have been using the TOP N tool in the filter pane, but something tells me this is not right, reason is in for e.g. Item F is used heavily in Jan 22, but not used in Feb 22, when i plot my graph, item F is not shown. Not sure why
I would like to do this via DAX.
I tried to do something like
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Top 5 item usage by month: =
CALCULATE (
SUM ( Data[Usage] ),
KEEPFILTERS (
TOPN ( 5, ALL ( 'Item'[Item] ), CALCULATE ( SUM ( Data[Usage] ) ), DESC )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
I cant get it to work
My relationships are defined as below
Items Table has a 1:M relationship with Usage Table. i.e. One ID from the Items table can have many items in the usage table.
The Usage Table has a 1:M relationship with the dates table. I.e.creation time on the usage table is a Many and it that has 1 relationship with the date table. i.e see below
I noticed in your formulae you are doing the sum of the data usage, I already have this value stored as a measure, so i am doing
Hi,
Thank you for your message.
Please check if Items table has other columns that influence the measure [TotalUsage] in the visualization.
Once the columns are identified, please write the measure something like below.
Top 5 item usage by month: =
CALCULATE (
[Usage measure:],
KEEPFILTERS (
TOPN ( 5,
ALL ( 'Item'[Item],'Item'[columnAinthevisualization],'Item'[columnBinthevisualization], and so forth ), [Usage measure:], DESC )
)
)
Or, if it is OK with you, please share your sample pbix file's link and then I can try to look into it.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
This is what i see, How do i add an .pbix file to this message? If i drag it on, it says file not compatible?
i have a demo file. How do i attach it?
Hi,
Please share the link of the pbix file.
You can try to use onedrive, googledrive, or dropbox to share the link.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
https://drive.google.com/file/d/1E1BQCz6HY3xgmUo3LePYUG8OarQG1M7y/view?usp=sharing
can you access the file via that link?
Note
Consumer Usage is the measure i am using. We only want to see Consumer Usage of items. Therefore the consumer usage is te metric we are measuring against. So we want to see top 5 consumer used item by Month.
Thanks
Hi,
Thank you for sharing.
However, it is difficult for me to understand the data model.
- Where can I find consumers information?
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
- Items table consists of item and each item has a ID
- Audit consists of the audit history of that item such as which operations they do to that item, (view it, edit it, export it etc), it also contains the ID of the item and the date that audit of that item took place.
- Activities is seperate table i created to define if an operation is a consumer activity or a admin activity. It connected to the audit table, so if the audit history table says the item was viewed, then i can state that was a consumer activity. If the audit table says that item was exported, then i know it was an admin activity.
The consumer is the operation they did from the audit history table labeled as a role.
Hope that makes sense
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
94 | |
88 | |
32 | |
28 |
User | Count |
---|---|
153 | |
101 | |
82 | |
63 | |
52 |