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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
gtamir
Post Patron
Post Patron

Using a Measure in a Measure

Hi,

 

MaxSale = MAX(RandomNumbers[Value]) is the highest value in the column value

Decile1 = [MaxSale]/10 is the Decile (98)

 

Count in 1St Decile = countrows(CALCULATETABLE(RandomNumbers,RandomNumbers[Value] >0 && RandomNumbers[Value] <=98)) this works.

 

Count in 1St Decile(2) = countrows(CALCULATETABLE(RandomNumbers,RandomNumbers[Value] >0 && RandomNumbers[Value] <=98)) This works too

 

What to do to use the "Decile1" measure instead of one of the values?

ScreenHunter_057.jpg

 

Thanks Giora

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @gtamir

 

The simplest fix is probably to store [Decile1] in a variable:

TEST =
VAR Decile1_Var = [Decile1]
RETURN
    COUNTROWS (
        CALCULATETABLE ( RandomNumbers, RandomNumbers[Value] > Decile1_Var )
    )

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @gtamir

 

The simplest fix is probably to store [Decile1] in a variable:

TEST =
VAR Decile1_Var = [Decile1]
RETURN
    COUNTROWS (
        CALCULATETABLE ( RandomNumbers, RandomNumbers[Value] > Decile1_Var )
    )

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Yes it works, thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.