The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
This is a completicated request so please see attached pbix file and query is also written inside the file.
Please this is an urgent request.
Thanks in advance.
Solved! Go to Solution.
Found a solution on an another forum:
Found a solution on an another forum:
Hi @mb0307 ,
First create a slicer table as below:
Slicer Table = DISTINCT('Date'[Week number])
Then create a measure as below:
Measure =
var _maxmonth=CALCULATE(MAX('Date'[Month Number]),FILTER(ALL('Date'),'Date'[Week number]=SELECTEDVALUE('Slicer Table'[Week number])))
Return
IF(MAX('Date'[Month Number])<_maxmonth,"WK"&MAXX(FILTER(ALL('Date'),'Date'[Month Name]=MAX('Date'[Month Name])),'Date'[Week number]),"WK"&SELECTEDVALUE('Slicer Table'[Week number]))
Finally you will see:
For details,pls see attached.
@v-kelly-msft Thanks for looking into my request.
Your DAX doesn't sum the Forecast by Months and Week Numbers are applied too all the months based on slicer selection.
I have recreated the pbix file with more clear request, please see the link in original post.
Thanks once again - please let me know if you have any queries.
Hi @mb0307 ,
Create a measure as below:
Measure =
var _maxmonth=CALCULATE(MAX('Date'[Month Number]),FILTER(ALL('Date'),'Date'[Week number]=SELECTEDVALUE('Slicer Table'[Week number])))
var _maxweeknumber=CALCULATE(MAX('Date'[Week number]),FILTER(ALL('Date'),'Date'[Month Number]=MAX('Date'[Month Number])&&'Date'[Month Number]<_maxmonth))
Return
IF(MAX('Date'[Month Number])<_maxmonth,CALCULATE(SUM(Final_FC[Forecast]),FILTER(ALL('Date'),'Date'[Week number]=_maxweeknumber)),
CALCULATE(SUM(Final_FC[Forecast]),FILTER(ALL('Date'),'Date'[Week number]=SELECTEDVALUE('Slicer Table'[Week number]))))
And you will see:
For the modified .pbix file,pls see attached.
Thanks a lot for looking into my request and sending me the pbix, but this is not the what I am looking for.
Sorry if I wasn't clear in explaining the output. This is what I want the output to look like:
The pbix I provided is not with the complete dataset. In the original dataset I have all the week in a year but I want the result to be based on the MAX Week of the month.
Thanks in advance.
Manoj
Can someone help with the query please?
@mb0307 , Can you please explain the requirement. Or is it written inside pbix ?
Thanks for your reply - much appreciated.
requirement is written inside pbix.
Thanks.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
82 | |
63 | |
53 | |
51 |
User | Count |
---|---|
127 | |
118 | |
81 | |
65 | |
64 |