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 all, I have a column called Fiscal Week Number and it has 1-27 weeks(I filtered 2020). Now for a KPI chart i have to display last 6 weeks and i am using C.Billings as a calculated measure . Please help me how to achieve it. I am using POWER BI default KPI card.
@v-jayw-msft
Solved! Go to Solution.
Hi, @harshagraj
Based on your description, I created data to reproduce your scenario.
Calendar(a calculated table):
Calendar = CALENDAR(DATE(2020,1,1),DATE(2020,12,31))
You may create a calculated column and a measure to diplay the data in last 6 weeks before today.
Calculated column:
weeknum = WEEKNUM('Calendar'[Date])
Measure:
var _cweeknum = WEEKNUM(TODAY())
var _weeknum = SELECTEDVALUE('Calendar'[weeknum])
var _cyear = YEAR(TODAY())
var _year = YEAR(SELECTEDVALUE('Calendar'[Date]))
return
IF(
_weeknum>=_cweeknum-6&&
_weeknum<=_cweeknum&&
_year=_cyear,
1,
0
)
Finally you may put the measure in the visual level filter. Here is the result. Today is 4/6/2020.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @harshagraj
Based on your description, I created data to reproduce your scenario.
Calendar(a calculated table):
Calendar = CALENDAR(DATE(2020,1,1),DATE(2020,12,31))
You may create a calculated column and a measure to diplay the data in last 6 weeks before today.
Calculated column:
weeknum = WEEKNUM('Calendar'[Date])
Measure:
var _cweeknum = WEEKNUM(TODAY())
var _weeknum = SELECTEDVALUE('Calendar'[weeknum])
var _cyear = YEAR(TODAY())
var _year = YEAR(SELECTEDVALUE('Calendar'[Date]))
return
IF(
_weeknum>=_cweeknum-6&&
_weeknum<=_cweeknum&&
_year=_cyear,
1,
0
)
Finally you may put the measure in the visual level filter. Here is the result. Today is 4/6/2020.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please create a week Rank,m using week start or week end date. That can we use to get the desired column
Refer this file : https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |