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.
Dear All
I am new to Powewr BI but I am truly enjoying what it is able to do fo rme
I have however hit a snag and am struggling with getting my head around a solution
In one column I have "Service Type" and in another column I have the week numbers
I am trying to create a measure that counts the number of occurencies of the "Service Type" if the Week number column is showing the latest week number (I.E the maximum week number in the column)
Unfortunately I have hit a wall and can't see the solution would anyon ebe able to advise me please
Regards
Kevin
Solved! Go to Solution.
Given this Enter Data query:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKstMTlUwVNJRMjZRitUhKGRohCJkhKkKLGSMImQMFYoFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Service = _t, WeekNum = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Service", type text}, {"WeekNum", Int64.Type}}) in #"Changed Type"
Create these measures:
MAXWeekNum = CALCULATE(MAX(Services[WeekNum]),ALL(Services)) CountWeekNum = COUNT(Services[WeekNum]) CountCurrentWeekNum = CALCULATE([CountWeekNum],FILTER(Services,Services[WeekNum] = [MAXWeekNum]))
Given this Enter Data query:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKstMTlUwVNJRMjZRitUhKGRohCJkhKkKLGSMImQMFYoFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Service = _t, WeekNum = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Service", type text}, {"WeekNum", Int64.Type}}) in #"Changed Type"
Create these measures:
MAXWeekNum = CALCULATE(MAX(Services[WeekNum]),ALL(Services)) CountWeekNum = COUNT(Services[WeekNum]) CountCurrentWeekNum = CALCULATE([CountWeekNum],FILTER(Services,Services[WeekNum] = [MAXWeekNum]))
Hi smoupre
Thank you for the swift reply it is appreciated
I have applied the measures as you suggested and that has indeed solved my problem thank you
Kevin
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 |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |