Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I use the following measure to compute % of things that occur each day of week for 5 years on a clustered column chart. Sometimes the % for a year may total 101% for example.
Can I add something to the measure to make sure each year the percentages equal 100%?
Hi,
Share some data to work with, explain the question and show the expected result. Please also ensure that you have a Calendar Table with a column of Week number.
hi @bdehning
Not sure about the logic, if limit to result to 100% is the only issue, you may try to change
RETURN
DIVIDE ( _count, _totalperyear )
to
VAR _pct =
DIVIDE ( _count, _totalperyear )
RETURN
IF(_pct<=1, _pct, 1)
| User | Count |
|---|---|
| 43 | |
| 35 | |
| 29 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 56 | |
| 40 | |
| 21 | |
| 19 |