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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
tt_london
Frequent Visitor

Standard Deviation for Unique Values in a Column rather than rowcount

How can I create a standard deviation for the unique values in a column? The built-in formula calculates it per row number.

 

Sample dataset

Business DateRevenue
01/01/2024100
01/01/2024200
02/01/2024

150

In this case N = 2, not 3.

1 ACCEPTED SOLUTION
ahadkarimi
Solution Specialist
Solution Specialist

Hi @tt_london, try calculated table and two measures below, and if you encounter any issues, let me know.

 

Create a calculated table:

UniqueBusinessDates = DISTINCT('Table'[Business Date])

Create a measure:

RevenueForUniqueDates = 
SUMX(
    'UniqueBusinessDates',
    CALCULATE(SUM('Table'[Revenue]))
)

Create a measure again:

StdDevUniqueRevenue = 
STDEVX.P(
    'UniqueBusinessDates',
    CALCULATE(SUM('Table'[Revenue]))
)

 

Did I answer your question? If so, please mark my post as the solution! ✔️
Your Kudos are much appreciated! Proud to be a Solution Supplier!

View solution in original post

2 REPLIES 2
ahadkarimi
Solution Specialist
Solution Specialist

Hi @tt_london, try calculated table and two measures below, and if you encounter any issues, let me know.

 

Create a calculated table:

UniqueBusinessDates = DISTINCT('Table'[Business Date])

Create a measure:

RevenueForUniqueDates = 
SUMX(
    'UniqueBusinessDates',
    CALCULATE(SUM('Table'[Revenue]))
)

Create a measure again:

StdDevUniqueRevenue = 
STDEVX.P(
    'UniqueBusinessDates',
    CALCULATE(SUM('Table'[Revenue]))
)

 

Did I answer your question? If so, please mark my post as the solution! ✔️
Your Kudos are much appreciated! Proud to be a Solution Supplier!

Instead of creating a table, can I use the Unique Days Measure I created before?

 

Unique Days = DISTINCTCOUNT(PNL[Business Date])

If yes, how can I adjust your code accordingly?

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.