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
Anonymous
Not applicable

Calculation between a data table and a reference table

Hello to all,

 

I am asking for your help concerning a measurement between two tables:
A table that serves as a reference and a table of time-stamped data.

I have created a measure that calculates the difference between a theoretical power and a real power. This measure works:

image.png

I would like to be able to count the number of times that this difference is less than or equal to the values that I have in my reference table which is below:

image.png

I also present my time-stamped table :

image.png

There is no link for the moment between these two tables.

Do you think this is possible?

 

Thank you in advance for your help,

Have a nice day

 

2 ACCEPTED SOLUTIONS

Hi.  Some example data in table form or a link to the .pbix would have been very useful.  Try this measure out.  I haven't been able to test it.

 

Distribution Measure = 

VAR _CurrentDistribution = SELECTEDVALUE('dim_distribution'[distribution])
VAR _Result =
COUNTROWS (
FILTER (
VALUES ( 'Table'[dt (1j)] ),
[ecart_modelisation] <= _CurrentDistribution
)
)

RETURN

_Result

View solution in original post

Anonymous
Not applicable

// It's very simple.
// Let's say you've put the
// distribution column in
// a slicer and you can
// select only one option
// at a time. Then this measure
// would give you the
// number of days (=times) where
// the measure [ecart_modelisation]
// is <= to the selected value/option.
// If there is more than one option
// visible in the current context,
// BLANK is returned.

[# Below or Equal] =
var DistributionVal =
    SELECTEDVALUE(
        dim_distribution[distribution]
    )
var Result = 
    IF( NOT ISBLANK( DistributionVal ),
        COUNTROWS(
            FILTER(
                DISTINCT( fact_points_mesure[dt(1j)] ),
                [ecart_modelisation] <= DistributionVal
            )
        )
    )
return
    Result

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

// It's very simple.
// Let's say you've put the
// distribution column in
// a slicer and you can
// select only one option
// at a time. Then this measure
// would give you the
// number of days (=times) where
// the measure [ecart_modelisation]
// is <= to the selected value/option.
// If there is more than one option
// visible in the current context,
// BLANK is returned.

[# Below or Equal] =
var DistributionVal =
    SELECTEDVALUE(
        dim_distribution[distribution]
    )
var Result = 
    IF( NOT ISBLANK( DistributionVal ),
        COUNTROWS(
            FILTER(
                DISTINCT( fact_points_mesure[dt(1j)] ),
                [ecart_modelisation] <= DistributionVal
            )
        )
    )
return
    Result
Anonymous
Not applicable

Hello @Anonymous  and @PaulOlding 

Thank you for your generous help, have a nice day,

Sincerely

Anonymous
Not applicable

Yes, I think it's perfectly possible.

Anonymous
Not applicable

Hello @Anonymous 

I would like to ask you again about my request, could you please explain the request to create in order to realize my calculation?

Thank you in advance,

Sincerely

Hi.  Some example data in table form or a link to the .pbix would have been very useful.  Try this measure out.  I haven't been able to test it.

 

Distribution Measure = 

VAR _CurrentDistribution = SELECTEDVALUE('dim_distribution'[distribution])
VAR _Result =
COUNTROWS (
FILTER (
VALUES ( 'Table'[dt (1j)] ),
[ecart_modelisation] <= _CurrentDistribution
)
)

RETURN

_Result

Anonymous
Not applicable

Hello @Anonymous 

Great thanks, could you please explain how?

Thanks in advance,

Joel

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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