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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pzinsli
Regular Visitor

New Measure with a cross filter

I am trying to build a new calculation, dividing a category Hours by Hours that are categorized by a separate table under Billable Status> Billable.  To start this process, I tried creating a new measure, basically to create the numerator of billable hours.  In the end I want to have billable hours/total hours as a percentage.  

 

My DAX formula for the numerator would not allow me to use the filter billable status> is billable, only 'billable status' so my pitiful attempt ended with this: 

 

Measure = CALCULATE(SUM('TIME TRACKING VALUES'[Hours]),FILTER('Transaction Line Attributes', 'Transaction Line Attributes'[Billable Status]= 'Transaction Line Attributes'[Billable Status], Billable)

 

 

I understand it is riddles with mistakes I need help with ideas on how to build this.  

1 ACCEPTED SOLUTION

 Is this what you need? the column 'Hours' is in the table TIME TRACKING VALUES and the other table is 'transaction Line Attributes' which includes the filter 'Billable Status' where the thre options are 'billable,' unbillable,' and 'billed.'  i would like to have the hours categorized as 'billable' divided by all hours: billable, unbillable, and billed.  I cannot share the actual columns with you unfortunately because the data is private. I hope this is enough.  connection page. set up by QQube.connection page. set up by QQube.Billable Status TableBillable Status TableTime Tracking Values tableTime Tracking Values table capture of new measure data.PNG

 

Thank You

View solution in original post

4 REPLIES 4
pzinsli
Regular Visitor

Measure = CALCULATE(SUM(('TIME TRACKING VALUES'[LinkToTxnID], FILTER('Transaction Line Attributes'[Billable Status])))/SUM('TIME TRACKING VALUES'[Hours])

 

 

this is my most recent attempt. It says the syntax for 'Measure' is incorrect

Greg_Deckler
Super User
Super User

Sample data please. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

 Is this what you need? the column 'Hours' is in the table TIME TRACKING VALUES and the other table is 'transaction Line Attributes' which includes the filter 'Billable Status' where the thre options are 'billable,' unbillable,' and 'billed.'  i would like to have the hours categorized as 'billable' divided by all hours: billable, unbillable, and billed.  I cannot share the actual columns with you unfortunately because the data is private. I hope this is enough.  connection page. set up by QQube.connection page. set up by QQube.Billable Status TableBillable Status TableTime Tracking Values tableTime Tracking Values table capture of new measure data.PNG

 

Thank You

The connection between Hours and their billing status seems to be based on that linktotxnID which was created by the QQube Quickbooks connector.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.