Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Need help trying to get a number based on the year and the week. I cannot just create a new measure in the original query but need to create a new measure in the visulization itself (data is detail level and the field I am reporting on is repeated many times - thus he max will get what I need).
I have tried the following but cannot figure out how to get the second criteria.
Employee Code | Hours | Year | Week | WestPac |
12324 | 8 | 2022 | 1 | 18 |
35465 | 7 | 2022 | 1 | 18 |
65487 | 6 | 2022 | 1 | 18 |
12324 | 5 | 2022 | 2 | 20 |
What I need it to tell me that for Year 2022 Week 1 its 18 and for Year 2022 Week 2 its 20.
Hope that helps more!
Almost there but apparently the fields (all three) are text and it must be a number. Now I tried to change it in the table using Change Type but I am getting other issues. Is it possible to change the fields to number in DAX? I tried the following and it failed:
Sumx(summarize(Table, VALUE(Table[Year]) , VALUE(Table[Week]), "_1", Max(VALUE(Table[WestPac]))),[_1])
Sumx(summarize(Table, Table[Year] , Table[Week], "_1", Max(Table[WestPac])),[_1])
or
calculate(Sumx(summarize(Table, Table[Year] , Table[Week], "_1", Max(Table[WestPac])),[_1]), Filter(allselected(Table), Table[Year] = Max(Table[Year]) && Table[Week] = Max(Table[Week]) ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |