Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, So I have two tables.
1. Dim Date
2. Fact Table
In the dim date table, I have created a new column that contains week numbers. On the other hand, using the fact table I created a new measure that contains my total revenue.
Now I want to calculate revenue each week.
The formula am using is: "Revenue per Week = CALCULATE([Revenue],All('Dim Date'[Weeknum])"
The result I am getting is:
Can someone tell me what am I doing wrong here?
Solved! Go to Solution.
Hi! For Revenue, just make the measure be Revenue = SUM('Your Table'[Revenue]) then in the visual, put the week numbers in and put in the Revenue measure - it will show you your revenue per week naturally.
Proud to be a Super User! | |
Since the figures are repeating that usually indicated that you don't have the date table joined to the fact table. Check to see if you have the join and if it is there, double check that it is working properly (i.e. put date from fact in a table and date from dim date in the same table and see if both columns are filled in).
Proud to be a Super User! | |
Hi! For Revenue, just make the measure be Revenue = SUM('Your Table'[Revenue]) then in the visual, put the week numbers in and put in the Revenue measure - it will show you your revenue per week naturally.
Proud to be a Super User! | |
@audreygerred I tried that too didn't work.
It only works when I create a new column with week numbers in the same table. Not when the week numbers are in another table.
Since the figures are repeating that usually indicated that you don't have the date table joined to the fact table. Check to see if you have the join and if it is there, double check that it is working properly (i.e. put date from fact in a table and date from dim date in the same table and see if both columns are filled in).
Proud to be a Super User! | |
Thank you so much! Yes, there was an error in the relation.
You're very welcome!
Proud to be a Super User! | |
User | Count |
---|---|
77 | |
76 | |
44 | |
31 | |
26 |
User | Count |
---|---|
97 | |
89 | |
52 | |
48 | |
46 |