cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Divide by row in DAX

Hi,

I would like help writing a DAX measure to divide by each row.

I want to know what % of students did not submit an assignment.
The issue comes in because we need to group the data by "Area" and "Term".
There are two "Terms" either Fall 2020 or Fall 2021.

Fortunately, there is a "% No Subs" calc column that gives a guideline of what I need the answers to look like.

Please see table below for an example:

There is a calculated column called "% No Subs".
That was calculated by dividing #! Submitted by Max Enrol.
However, I would like to create a measure that does this exact thing because measures are better than calc columns.

Here is what I have tried:
1.

Rate =
SUMMARIZE('No Submissions Data','No Submissions Data'[Area],"Rate",SUMX (
'No Submissions Data',
DIVIDE('No Submissions Data'[# ! Submitted],'No Submissions Data'[Max Enrol])
))
2.
Difference =
VAR f20 = CALCULATE('No Submissions Data'[No Submissions Rate],'No Submissions Data'[Term] = "Fall 2020")

RETURN

VAR f21 = CALCULATE('No Submissions Data'[No Submissions Rate],'No Submissions Data'[Term] = "Fall 2021")

RETURN

F21 - F20

TIA
3 REPLIES 3
Continued Contributor

If you put Area and Term on the rows with the measure that @PaulOlding provide will work.
If it doesn't give you the result you are expecting, you'll need to provide us with more information.
Example of the calculation, example of visual ...

Solution Sage

Hi,

Rate =
VAR _NoSub = SUM('No Submissions Data'[# ! Submitted])

VAR _Enrol = SUM( 'No Submissions Data'[Max Enrol])

RETURN

DIVIDE(_NoSub, _Enrol)

Anonymous
Not applicable

Hi Paul,

That won't give an accurate result.

Each area has a different denominator (Max Enrol).
Dividing by the total sum is will give the wrong answer to the question at hand.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.