'How do you calculate the percent of rows in a table that are in each of the four quartiles in DAX?

How do you calculate the percent of rows in a table that are in each of the four quartiles? For example, in a table that just has a list of scores, how can I get a result so that I get for instance 20% are in Q1, 20% in Q2, 30% in Q3, and 30% in Q4?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source