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
Anonymous
Not applicable

issue while calculating % of total on matrix value

Hey Everyone,

I'm new to Power BI, i need some help.

I'm trying to populate

Avg Transaction LC = Total Sales / total transaction

 

for last 12 month here is formula

 

Avg Transaction LC Last 12 Months:=CALCULATE (
[Avg Transaction LC],
DATESINPERIOD ( 'date'[Date], MAX ( 'date'[Date] ), -12, MONTH )
, ALL('date')
)

 

 

but the values in table matrix should not be greater than 100% as shown in green highlighted in below image.

 

 

Untitled.png

 

Onething i want to add here simple sales amount or no of transactions are working fine even if i want to see % of total it's working 100% ok. but in case of Avg Transaction Value matrix expected behaviour is not as it is in simple measure... I only dividing two measures. Not getting why it's behaving like this.

Help will be appreciated.

Thanks

 

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , I assuming Total sales and Total transaction are measure and formula is like this

Avg Transaction LC = divide([Total Sales],[total transaction])

 

Try this without all date

Avg Transaction LC Last 12 Months:=CALCULATE (
[Avg Transaction LC],
DATESINPERIOD ( 'date'[Date], MAX ( 'date'[Date] ), -12, MONTH )
)

Anonymous
Not applicable

@amitchandak 

Yes you are correct both are measures.

And i've tried by removing all dates from measure ... still same behaviour

 

Hi @Anonymous ,

 

Have you resolved it? Does the answer make sense?

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous ,

 

Can I ask why you show values as percentage of column total? Do you just want to show percentage format of the measure result?If so, you could click the measure and choose percentage as image shown.

5.PNG

 

The option of  show values as percentage of column total means :

% =
DIVIDE (
    [Avg Transaction LC Last 12 Months],
    CALCULATE (
        [Avg Transaction LC Last 12 Months],
        ALLSELECTED ( 'table'[Tenant Name] )
    )
)

 

If you still can't resolve it, please share some sample data and expected output. We will understand more clearly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.