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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pratiwari17
Regular Visitor

First Quartile calculation in Power BI

Hi , I have a dataset where i am calculating Energy Use Index and i want a card metric to calculate First Quartile of Energy Use Index.  Please provide me a way to calculate it. I have location, area of the location and Energy Use Index is total energy consumption / total area and we have a year filter. Data Source is databricks and mode is Direct Query mode. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pratiwari17 ,

I create a table as you mentioned.

vyilongmsft_0-1716951557921.png

Then I use a measure and show the result on the card visual.

EUI_First_Quartile = 
CALCULATE(
    MEDIANX(
        TOPN(
            ROUNDUP(DIVIDE(COUNTROWS('YourTable'), 2), 0),
            'YourTable',
            'YourTable'[EUI_Column_Name],
            ASC
        ),
        'YourTable'[EUI_Column_Name]
    ),
    ALLSELECTED('YourTable')
)

vyilongmsft_1-1716951724332.png

 

 

Best Regards

Yilong Zhou

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @pratiwari17 ,

I create a table as you mentioned.

vyilongmsft_0-1716951557921.png

Then I use a measure and show the result on the card visual.

EUI_First_Quartile = 
CALCULATE(
    MEDIANX(
        TOPN(
            ROUNDUP(DIVIDE(COUNTROWS('YourTable'), 2), 0),
            'YourTable',
            'YourTable'[EUI_Column_Name],
            ASC
        ),
        'YourTable'[EUI_Column_Name]
    ),
    ALLSELECTED('YourTable')
)

vyilongmsft_1-1716951724332.png

 

 

Best Regards

Yilong Zhou

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.