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.
Hi,
I would create a measure to work out % change between (% of calls answered - week 1) and (% of calls answered - week 2). Currently I have cards which show both figures seperately. But I'd like to create a card which works out the % change and I've tried using the following measure but doesn't work...
can someone help....
Solved! Go to Solution.
Hi @ZD1 ,
Please try like this:
LastWeek =
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Date' ), 'Date'[Week] = MIN ( 'Date'[Week] ) - 1 )
)
%Change =
VAR t =
FILTER (
SUMMARIZE (
'Date',
'Date'[Week],
"Sales_", SUM ( 'Table'[Sales] ),
"Last", [LastWeek]
),
[Sales_] <> BLANK ()
)
VAR tt =
FILTER (
ADDCOLUMNS (
t,
"per", DIVIDE ( [Sales_] - [Last], [Sales_] ),
"maxweek", MAXX ( t, [Week] )
),
[Week] = [maxweek]
)
RETURN
MAXX ( tt, [per] )
You could download the attachment below. If this can't work, can you please share the sample data table and the expected result? Then we will understand clearly.
Hi @ZD1 ,
Please try like this:
LastWeek =
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Date' ), 'Date'[Week] = MIN ( 'Date'[Week] ) - 1 )
)
%Change =
VAR t =
FILTER (
SUMMARIZE (
'Date',
'Date'[Week],
"Sales_", SUM ( 'Table'[Sales] ),
"Last", [LastWeek]
),
[Sales_] <> BLANK ()
)
VAR tt =
FILTER (
ADDCOLUMNS (
t,
"per", DIVIDE ( [Sales_] - [Last], [Sales_] ),
"maxweek", MAXX ( t, [Week] )
),
[Week] = [maxweek]
)
RETURN
MAXX ( tt, [per] )
You could download the attachment below. If this can't work, can you please share the sample data table and the expected result? Then we will understand clearly.
Hi @ZD1 ,
Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can do with Week Rank and Date calendar. Please refer a related pbix
https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
63 | |
62 |
User | Count |
---|---|
139 | |
104 | |
104 | |
80 | |
66 |