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
Majad_Chowdhury
Advocate II
Advocate II

Create custom data label showing weekly change

Hi All,

 

I have a dataset that contains information on what sales stage each customer is each week.

WeekCustomerStage
1GrapefruitLead
2GrapefruitNegotiation
3GrapefruitContract
1BellNegotiation
2BellNegotiation
3BellCompleted
etcetcetc

'So imagine something like this:

 

I have a clustered column visual which is always filtered to a week. So lets say its only showing week 4 data.

 

The X axis has Sales Stages.

 

e.g.

0% - Lead

20% - Approach

40% - Negotiation

60% - Agreement

80% - Contract

100% - Completed

 

The Y axis has the number of customers in each stage (Count of Customer). I want to have a data label that shows the week on week change. So in this instance we have Week 4 selected, I would like the data label to show the growth/reduction in amounts in each sales stage from week 3. Ala the pic below.

 

Majad_Chowdhury_0-1707150038757.png

 

Hope ive made the problem clear enough to solve, let me know if you need more information

 

1 REPLY 1
Daniel29195
Super User
Super User

@Majad_Chowdhury 

so ,

the visual is always filtered to 1 week .

+  

the visual oin the x axiss shows the stages.

you want per eachs tage, the week over week change as custom data label .

 

 

one more thing,

does the column week  have from 1 -- 53 weeks,per year or does it just continue nonstop ,?  45, 55, 56  ? 

 

i will create the measure assuming that your week column contains data from week1 to week53 per each year

 

sample data : 

Daniel29195_0-1707160730011.png

 

count ofcustomers for week2 =  3 

count of customers for prev week  = 1 

w over w = (3 - 1) / 1  = 2/1 = 200%

ouptut : 

Daniel29195_1-1707160997413.png

 

 

measure : 

Measure 5 = 

var prev_week = 
CALCULATE(
    COUNT(week_over_week[customer]),
    OFFSET(
        -1,
        CALCULATETABLE(
            SUMMARIZE(
                week_over_week,
                week_over_week[week]
            ),
            REMOVEFILTERS(week_over_week[week])
        ),
        ORDERBY(week_over_week[week] , ASC)
    )
) 


return  (COUNT(week_over_week[customer]) - prev_week ) / prev_week

 

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.