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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

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 @Anonymous ,

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 @Anonymous 
try creating a table with summarizecolumns function , 
SUMMARIZECOLUMNS( ) DAX function.
and then you can use divide

 

Anonymous
Not applicable

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 @Anonymous ,

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.