Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Bonjour,
J'aimerai créer une graphique qui me reprend les 8 dernières semaines suivant la semaine sélectionné dans un segment.
J'ai une table de créé avec la date, une colonne avec le Weeknum.
Je ne sais pas comment procéder pour que dès qu'un utilisateur clique sur une semaine du segment, (exemple : S6, cela va créer le graphique avec S1 - S2 - S3 - S4 - S5 - S6.
S'il clique sur S12, ça va créer le graphique avec S5,6,7,8,9,10,11,12... etc...
J'ai déjà fait plein de tests, mais aucuns concluants...
Avez-vous des idées svp ??
Merci d'avance !!
Solved! Go to Solution.
Thanks for the reply from amitchandak and rajendraongole1.
Hi @Anonymous ,
Here I have another idea in mind, and I would like to share it for reference.
1.Create simple data, the following figure is Table and Table 2 is the copy of Table:
2. Create a measure:
Measure = VAR _current_select = SELECTEDVALUE('Table 2'[Year_weeknum]) VAR _min = _current_select-8 RETURN IF(SELECTEDVALUE('Table'[Year_weeknum])>=_min&&SELECTEDVALUE('Table'[Year_weeknum])<=_current_select,1,0)
3.Then use measure to filter on the visual:
4.Use Year_weeknum from Table 2 as the slicer field, and the final result is as follows:
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks for the reply from amitchandak and rajendraongole1.
Hi @Anonymous ,
Here I have another idea in mind, and I would like to share it for reference.
1.Create simple data, the following figure is Table and Table 2 is the copy of Table:
2. Create a measure:
Measure = VAR _current_select = SELECTEDVALUE('Table 2'[Year_weeknum]) VAR _min = _current_select-8 RETURN IF(SELECTEDVALUE('Table'[Year_weeknum])>=_min&&SELECTEDVALUE('Table'[Year_weeknum])<=_current_select,1,0)
3.Then use measure to filter on the visual:
4.Use Year_weeknum from Table 2 as the slicer field, and the final result is as follows:
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Anonymous - Can you please translate to engilish and share the expectations
Thank you
Proud to be a Super User! | |
@Anonymous , In case you select a week and want to display more than one week as trend(Group/Axis), then you need a disconnected table
Have week rank column in date and disconnected date table (Date1/DateInd)
Week Rank = RANKX('Date','Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX('Date','Date'[Year Week],,ASC,Dense) //YYYYWW format
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Rank])
var _min = _max -8
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Rank] >=_min && 'Date'[Rank] <=_max))
//DateInd is joined with Inactive join, Date is joined with Table with Active join.
new measure =
Var _max = Max('Date'[Rank])
var _min = _max -8
return
CALCULATE( sum(sales[Gross Sales]),filter(ALL('Date'), 'Date'[Rank]>=_min && 'Date'[Rank]<=_max) ,USERELATIONSHIP('DateInd'[Date], Sales[Sales Date]))
Create a 12-Month Trend with Single Slicer Selection on connected Date table- https://www.youtube.com/watch?v=7dPrPk6LPYU&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&index=2
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |