Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe'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
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 students | targets | |
| Uni A | 1000 | 800 |
| Uni B | 1500 | 1200 |
| Uni C | 2000 | 2500 |
Solved! Go to Solution.
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] )
Best Regards
Hi @Anonymous
try creating a table with summarizecolumns function ,
SUMMARIZECOLUMNS( ) DAX function.
and then you can use divide
the original actual students is a measure as following
I cannot find the field in the function.
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] )
Best Regards
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.
# target students: =
SUM( target[targets] )
# actual students: =
SUM( actual[actual students] )
Ratio: =
DIVIDE( [# actual students:], [# target students:] )
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 39 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 37 | |
| 35 | |
| 26 |