Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Team I want to show only present week and previous week sales data.i mean only current week and previous week. I have week data available,
could you please help us with the DAX formula to get only present week of data and only previous week of data and how can I compare this on bar chart.
Solved! Go to Solution.
Hi @Anonymous ,
You may put geography wise onto Rows box, put column Week Number onto Columns box, put measures Present week sales and Previous week sales onto Values box.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can try to create week column first, then create measures like DAX below.
Column: Week Number= WEEKNUM(Table1[Date]) Measure: Present week sales= CALCULATE(SUM(Table1[sales]),FILTER(ALLSELECTED(Table1),Table1[Week Number] =MAX(Table1[Week Number]))) Measure: Previous week sales= CALCULATE(SUM(Table1[sales]),FILTER(ALLSELECTED(Table1),Table1[Week Number] =MAX(Table1[Week Number])-1))
Then choose Clustered bar chart visual to display the result, put column Week Number onto Axis box, put the other measures onto Value box.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This really helps..if I want to show the current weeks sales and previous week sales in geography wise?
Please help if I want to show current week sales and previous week sales geography wise
Thank you.
Hi @Anonymous ,
>>Please help if I want to show current week sales and previous week sales geography wise
From your words, could you please clarify what the "geography wise" is referred to ?
Best Regards,
Amy
For Eg:
Country wise , area wise , region wise...
United sates current week sales ,,, previous week sales.
canada Current week sales (value) previous week sales(value)
I want this in the the matrix chart.
Hi @Anonymous ,
You may put geography wise onto Rows box, put column Week Number onto Columns box, put measures Present week sales and Previous week sales onto Values box.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |