Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
epang0714
Frequent Visitor

Do a Divide function

Hi, 

 

I have a combined table with actual studetns vs Targets. The two fields come from a separate table. Is it possible to do a divide function as a calculated column to see porportion of target achieved? Thanks

 

 actual studentstargets
Uni A1000800
Uni B15001200
Uni C20002500
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @epang0714 ,

You can create calculated column as below in the table 'Target data' to get it:

Porportion =
VAR _actual =
    CALCULATE (
        DISTINCTCOUNT ( 'Fact data'[StudentID] ),
        FILTER (
            'Fact data',
            'Fact data'[Uni] = 'Target data'[Uni]
                && 'Fact data'[Commencement_Year] = 'Fact data'[Timeperiod]
        )
    )
RETURN
    DIVIDE ( _actual, 'Target data'[targets] )

vyiruanmsft_0-1736303140775.png

vyiruanmsft_1-1736303199949.png

Best Regards

View solution in original post

4 REPLIES 4
govind_021
Super User
Super User

Hi @epang0714 
try creating a table with summarizecolumns function , 
SUMMARIZECOLUMNS( ) DAX function.
and then you can use divide

 

epang0714
Frequent Visitor

the original actual students is a measure as following

CALCULATE(DISTINCTCOUNT('Fact data'[StudentID]),FILTER('Fact data','Fact data'[Timeperiod]= 'Fact data'[Commencement_Year]

I cannot find the field in the function. 

Anonymous
Not applicable

Hi @epang0714 ,

You can create calculated column as below in the table 'Target data' to get it:

Porportion =
VAR _actual =
    CALCULATE (
        DISTINCTCOUNT ( 'Fact data'[StudentID] ),
        FILTER (
            'Fact data',
            'Fact data'[Uni] = 'Target data'[Uni]
                && 'Fact data'[Commencement_Year] = 'Fact data'[Timeperiod]
        )
    )
RETURN
    DIVIDE ( _actual, 'Target data'[targets] )

vyiruanmsft_0-1736303140775.png

vyiruanmsft_1-1736303199949.png

Best Regards

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a measure.

 

Jihwan_Kim_0-1736222364218.png

 

Jihwan_Kim_1-1736222532836.png

# target students: = 
SUM( target[targets] )

 

# actual students: = 
SUM( actual[actual students] )

 

Ratio: = 
DIVIDE( [# actual students:], [# target students:] )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors