This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I am looking to basically combine two bar graphs. I want to show the diference before and after a major change. This involves comparing data by day. So I want to show the difference between the same days of the week from two different weeks side by side in a bar graph. When I add multiple dates that are the same day of the week, the data is just compbined. Is there a way to get them to show side by side?
Thank you
Solved! Go to Solution.
Hi @Gflood ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
DISTINCT('Table'[Date])
2. Create measure.
Flag =
var _select=
SELECTCOLUMNS('Table 2',"selectdate",'Table 2'[Date])
var _column1=
ADDCOLUMNS( _select,"mindate",MINX(FILTER(ALL('Table'),'Table'[Weeknum]=WEEKNUM(EARLIER([selectdate]),2)-1&&'Table'[Weekday]=WEEKDAY(EARLIER([selectdate]),2)),[Date]),
"maxdate",MINX(FILTER(ALL('Table'),'Table'[Weeknum]=WEEKNUM(EARLIER([selectdate]),2)+1&&'Table'[Weekday]=WEEKDAY(EARLIER([selectdate]),2)),[Date]))
return
IF(
MAX('Table'[Date]) in _select ||
MAX('Table'[Date]) in SELECTCOLUMNS(_column1,"mindate",[mindate]) ||
MAX('Table'[Date]) in SELECTCOLUMNS(_column1,"maxdate",[maxdate]),1,0)
3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Gflood ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
DISTINCT('Table'[Date])
2. Create measure.
Flag =
var _select=
SELECTCOLUMNS('Table 2',"selectdate",'Table 2'[Date])
var _column1=
ADDCOLUMNS( _select,"mindate",MINX(FILTER(ALL('Table'),'Table'[Weeknum]=WEEKNUM(EARLIER([selectdate]),2)-1&&'Table'[Weekday]=WEEKDAY(EARLIER([selectdate]),2)),[Date]),
"maxdate",MINX(FILTER(ALL('Table'),'Table'[Weeknum]=WEEKNUM(EARLIER([selectdate]),2)+1&&'Table'[Weekday]=WEEKDAY(EARLIER([selectdate]),2)),[Date]))
return
IF(
MAX('Table'[Date]) in _select ||
MAX('Table'[Date]) in SELECTCOLUMNS(_column1,"mindate",[mindate]) ||
MAX('Table'[Date]) in SELECTCOLUMNS(_column1,"maxdate",[maxdate]),1,0)
3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |