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,
How do I use the GroupBy and Having clause in my dataset? I have the following table:
[TableA]
Name Completed TaskNumber
Opp1 No 1
Opp1 No 2
Opp1 No 3
Opp1 No 4
Opp2 No 1
Opp2 No 2
Opp2 No 3
In SQL the statement would be this:
Select Name from [TableA] GroupBy Name Having Count(TaskNumber) > 3
Thanks
Solved! Go to Solution.
Thanks Matt but this didn't really do what I needed.
In the end I did a Group By via the Query Editor and did a slice visualisation against the count.
Cheers
Power BI doesn't work this way (I guess you know that). Are you trying to see these records in a visual, such as a table? If so, you need to write a measure that returns a non blank result when it passes your having test, and then place that in a visual along with the columns you want to see. A measure could be
display = if(countrows(tableA))>=3,countrows(tableA))
put name and the measure in a visual
Thanks Matt but this didn't really do what I needed.
In the end I did a Group By via the Query Editor and did a slice visualisation against the count.
Cheers
What If I want a sum of the subtotals that meet those rules? Currenly I get a total of all rows combined.
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |