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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
javaid355
Frequent Visitor

Unable to divide measure by a column in SSAS Model

I am trying to divide a measure [credit-Debit ] by a column "job weekly scheduled hours" in order to get the houlry rate . The data is in SSAS layer. I can only derive measures . Calculated columns are not allowed. ( igonore the negative sign in [credit - debit].

javaid355_0-1595296295704.png

I'd appreciate any feed backs.

Thanks

Javaid

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi  @javaid355 

Since you are using Live connection in power bi, it is live connecting to a data model, so you could just create report level measure in power bi, all other modeling like create column/table,etc needs to be done in ssas.

https://radacad.com/live-connection-when-power-bi-comes-hybrid

 

For your case,just create a measure as below to get your requirement:

Result=DIVIDE([credit-Debit ] , SUM(Table[Job Scheduled Weekly Hour]))

 

Regards,

Lin 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lin, 

I am not getting the desired results by using this formula.

javaid355_0-1595518225148.png

 

javaid355_1-1595518283410.png

Please let me know your thoughts.

Thanks.

Jav

amitchandak
Super User
Super User

@javaid355 ,

Divide should be measure only  

Measure = divide(sumx(Table,abs(Table[credit - debit])),sum(Table[Job Scheduled Weekly Hour]))

 

or

AvergaeX(Table,divide(abs(Table[credit - debit]),Table[Job Scheduled Weekly Hour]))

Hey Amit,

Both of your suggestions are not giving the correct hourly rate. ( just a reminder that [credit-debit] is a calculated measure, not a column.

Thanks.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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