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
DANIPAR
New Member

Comparison between last and this month rating when counting unique IDs

Hello,

 

I have a table with raw data with these colums (Create date, ID (which are unique values), Operator number, Status(COLD or HOT), Qualification (Qualified or Unqualified).

 

CreatedDateIdOperator numberStatusQualification
2018-03-09 18:0100Q5800000VGMQzEAP65005COLDQualified
2018-03-09 18:0300Q5800000VGMRTEA565005COLDUnqualified
2018-03-09 18:0600Q5800000VGMRxEAP65005COLDQualified
2018-03-09 18:0700Q5800000VGMS7EAP65005COLDQualified
2018-03-09 18:0900Q5800000VGMSbEAP65005COLDQualified
2018-03-09 18:1100Q5800000VGMSgEAP65005COLDUnqualified
2018-03-09 18:1200Q5800000VGMT8EAP65005COLDQualified
2018-03-09 18:1400Q5800000VGMTIEA565005COLDQualified
2018-03-09 18:1500Q5800000VGMTcEAP65005COLDQualified
2018-03-09 18:5100Q5800000VGMXxEAP65008HOTQualified
2018-03-10 11:1000Q5800000VGNxTEAX65029COLDUnqualified
2018-03-10 11:1100Q5800000VGNxsEAH65029COLDQualified

 

My goal is to create such table:

Operator numberCount of IDsCurrent month's ratingCurrent rating vs last months rating
65005121-2
650291020
6507563+2

 

My goal is to rate operators (by their operator number), while counting IDs and assign a rating + compare current month's rating VS last months rating (to show how many possitions were gained(-)/lost(+)). + filters for Status (HOT) and Qualification (Qualified).

 

Thank you very much!

 

3 REPLIES 3
AlB
Super User
Super User

@DANIPAR

1. Create a DateT date table to select the month considered "current" and a realship with the fact table

2. Place DateT[YearMonth] in a slicer and select the base month of interest ("current")

3. Place Table1[Operator Number] in a visual table

4. Create these 4 measurements and place them in the visual table

CountId = COUNT(Table1[Id])
Rank Current Month = RANKX(ALL(Table1[Operator number]), [CountId])
Rank Previous Month = 
CALCULATE([Rank Current Month], PREVIOUSMONTH(DateT[Date]))
Current rank vs last months rank =
[Rank Current Month] - [Rank Previous Month]

5. View everything at work in the attachment.

You'll probably have to adjust it a little bit to get what exactly you need, but this should give you a pretty good idea

Please mark the resolved question when you are finished and consider giving a thumbs up if the posts are useful.

Contact me privately for assistance with any large-scale BI needs, tutoring, etc.

Bless you

SU18_powerbi_badge

AlB
Super User
Super User

Hi @DANIPAR 

What exactly is "Current month"? Is it the actual current month (ie now December-20) or is it something you want to specify on a slicer? Any other things to consider?

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

Thank you for reply. 

I will some addition - it might sound confusing, but current month actually is past month (e.g. now is December and I will be calculating results for November). So the last month would be October.

 

 

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.