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 have a dataset with sales different times a day which could look like below.
I made a colum with the simple dax HOUR(), that make all sales between 0-1 to hour '0' so i could get a visualization of the total sales pr hour in a table/matrix.
So we have a total sales of 600 in the first hour (0) and a total sales of 900 in the second hour (1), which give a growth on 50%.
My problem is that i cant figure out how to get the percentages growth pr hour like shown above in a table/matrix.
Anyone with a solution to this?
In advance thanks.
Solved! Go to Solution.
Hi @Anonymous ,
Based on my test, you could refer to below formula:
Growth in Percentange = var a=[Hour]-1 var b=CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Hour]=a)) return IF(b=0,BLANK(),([Sales]-b)/b)
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @Anonymous ,
Based on my test, you could refer to below formula:
Growth in Percentange = var a=[Hour]-1 var b=CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Hour]=a)) return IF(b=0,BLANK(),([Sales]-b)/b)
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @v-danhe-msft,
Is it possible to simplify my dateset like yours, with only one value of hour 0, 1, 2 and so on, because i in my dataset i have a lot of values of each, its only inside my repport that its simplified to one value of each. I tried to imply your formula, but seems like it doesnt work when the data isnt in one value.
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |