Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
New to power BI and would like to create a bar chart that shows the top 5 customers for the current month and also these top 5 customers results in previous month so comparisons can be made on how they've changed.
Thanks in advance,
N
Solved! Go to Solution.
managed to complete this, in the end, using by creating a max variable as a filter for weeks
Current Week:
test current =
VAR Weeknumber = max('Case Data Collector trending'[Week number])
RETURN
CALCULATE(sum('Case Data Collector trending'[Case]), 'Case Data Collector trending'[Week number] = Weeknumber)
managed to complete this, in the end, using by creating a max variable as a filter for weeks
Current Week:
test current =
VAR Weeknumber = max('Case Data Collector trending'[Week number])
RETURN
CALCULATE(sum('Case Data Collector trending'[Case]), 'Case Data Collector trending'[Week number] = Weeknumber)
Firstly, you need to create a measure to calculate the previous month sales. It can be something like:
Previous Month Sales = CALCULATE ( SUM ( Sales[Sales] ), PREVIOUSMONTH ( Calendar[Date] ) )
Then you can add a TOP N Visual Level Filter based on Sales.
Regards,
Thank you for the reply,
I used the calculation given but for some reason, it comes up as zero on the graph. so perhaps its to do with the data.
my data basically shows the customers name, a reference number, the amount on sale and the date of sale.
Cheers
Nathan
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |