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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculating Current Week Percentage Score, Previous Week Percentage Score and Change of Over Change

When I use these formalas I am not getting any values, it return blank, the Total Score is in Percentage
Score Current Week =
CALCULATE ( [TOTAL  Score], DimDate[Week Offset] = 0)
 
Score Prior Week =
CALCULATE([TOTAL Score],DimDate[Week Offset] = -1)
 
Score Week Over Week Change =
[Score Current Week] - [Score Prior Week]
3 REPLIES 3
Anonymous
Not applicable

I managed to solved this.

Anonymous
Not applicable

Hi @FreemanZ 

 

Kindly please find the information you requested below.

 

DimDate is as follows, I copied only few dates:

DateYearQuaterWeek NumberMonth NumberMonthDay Of WeekWeek Offset
Sunday, 22 January 20232023Q141JanuarySunday-1
Monday, 23 January 20232023Q141JanuaryMonday-1
Tuesday, 24 January 20232023Q141JanuaryTuesday-1
Sunday, 29 January 20232023Q152JanuarySunday0
Monday, 30 January 20232023Q152JanuaryMonday0
Tuesday, 31 January 20232023Q152JanuaryTuesday0
Sunday, 4 February 20232023Q162FebruarySunday1
Monday, 5 February 20232023Q162FebruaryMonday1
Tuesday, 6 February 20232023Q162FebruaryTuesday1

 

The first Dax Measure:

VMScorecard =
VAR VMPoints = 10
VAR VMScore =
COUNTROWS (
FILTER (
FactData,
FactData[Details.score]
|| FactData[Captured.score]
|| FactData[Record.score]
|| FactData[AssistantRecord.score] > 0
)
) / [Total None Business]
RETURN
( VMScore * VMPoints ) / 100

 

The Second Dax Measure:

 

VM (Normal) =
AVERAGEX (
VALUES ( FactData[customer_data.customerid] ),
[VMScorecard]
)

 

Third Dax Measure:

 

GMSScorecard =
VAR GMPoints = 10
VAR GMScore =
COUNTROWS (
FILTER (
FactData,
FactCallData[Used.score] > 0
)
) / [Total None Business]
RETURN
( GMScore * GMPoints ) / 100

 

Fourth Dax Measure:

 

GM (Normal) =
AVERAGEX (
VALUES ( FactData[customer_data.customerid] ),
[GMSScorecard]
)

 

Fifth Dax Measure:


TOTALS = ([GM (Normal)] + [VM (Normal)])

 

 

6th Dax Measure, this is where the total score comes from:

 

TOTAL Score =
AVERAGEX (
VALUES ( FactData[customer_data.customerid] ),
[TOTALS]
)

 

FreemanZ
Super User
Super User

hi @Anonymous 

what fitler context do you have for the three measures?

what code do you have for [TOTAL  Score]?

how does the DimDate[Week Offset] column look like?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors