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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Power BI How to avoid sum of created measure

I have a database contains "Company Names","Purchase Order","Payment Amount". data preview image is below

Data PreviewData Preview

I try to create matrix table with columns;

Company name: Returns company names, that' s OK

Hk: at how many times I have pay that company, at this point i have a problem

SUM_Payment: sums all payments, that' s ok, see matrix table image below;

pci2.png

 

I tried to create measure that gives to Hk Sum false for avoding summing (like HASONEVALUE), but B Company has two value so B Company's Hk returns also false...

 

My expectation from matrix table is "Not to see sum of Hk" . How can I avoid summing Hk ?

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try with ISFILTERED:

 

Hk =
IF(
    ISFILTERED( Hakedis_Data[Company_name] ),
    MAX( Hakedis_Data[Purchase Order] ),
    BLANK()
)

 

Regards 

View solution in original post

2 REPLIES 2
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try with ISFILTERED:

 

Hk =
IF(
    ISFILTERED( Hakedis_Data[Company_name] ),
    MAX( Hakedis_Data[Purchase Order] ),
    BLANK()
)

 

Regards 

amitchandak
Super User
Super User

@Anonymous , use isinscope or isfiltered and try

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

if(isinscope(Table[Company Name]), [HK], blank())

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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