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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jgpbi
Frequent Visitor

Can you replace a total(summarize) with a measure of your own?

I have a column of data that I want a total for but the summarization only gives me First/Last/Count/Count(distinct) and none of those apply. 

 

Can I have the total be a measure I calculate myself?

1 ACCEPTED SOLUTION
jgpbi
Frequent Visitor

Thank you. I wasn't aware of the hasonevalue function. It worked perfectly for me. 

View solution in original post

2 REPLIES 2
jgpbi
Frequent Visitor

Thank you. I wasn't aware of the hasonevalue function. It worked perfectly for me. 

v-jianboli-msft
Community Support
Community Support

Hi @jgpbi ,

 

Please check the data type of your data, if they are text, the summarization will only give you First/Last/Count/Count(distinct).

If you need SUM/MAX/MIN, you need to change the data type to number.

 

For more details, please refer to:

Data types in Power BI Desktop - Power BI | Microsoft Learn

Work with aggregates (sum, average, and so on) in Power BI - Power BI | Microsoft Learn

 

Besides, if you just want to replace the value of your own, you could use the DAX Functions:

ISINSCOPE function (DAX) - DAX | Microsoft Learn or  HASONEVALUE function (DAX) - DAX | Microsoft Learn

Here is a simple sample:

Original data:

vjianbolimsft_1-1681971349509.png

 

vjianbolimsft_0-1681971329281.png

You can replace the 0 with any value you want to display in the row subtotals:

vjianbolimsft_2-1681971426534.png

You can replace the 0 with any value you want to display in the column subtotals:

vjianbolimsft_3-1681971525835.png

In practical applications, it can be very flexible depending on the needs

 

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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