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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DavidUK13
Helper I
Helper I

Best way to approach problem

Hi,

I have a dashboard in the making for solar panels.

Would like to connect the Solar Generation with the Export Tables in some way.

I have some measures created.

DavidUK13_0-1685222714364.png

I also have a table with the Export Prices depending on when the export occurs.

DavidUK13_2-1685223012105.png

 

 

Ultimatly, what I would like to have is a measure that multiples the Export by the Price.

So the 26th of May as an example would be:

 

Peak Rate

2.7 * 0.337

Day Rate
1.8 *  0.209

 

Flux Rate

 

0.0 * 0.082

Then I can create a total. The tables aren't linked as there isn't anything to link them with>>Many thanks in advance.

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @DavidUK13 ,

According to your description, I create a sample like yours, here's my solution. Create a measure:

Measure =
VAR _peak =
    MAX ( 'Solar Generation'[Export During Peak Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Peak Rate" ),
            'Export'[Export Price]
        )
VAR _flux =
    MAX ( 'Solar Generation'[Export During Flux Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Flux Rate" ),
            'Export'[Export Price]
        )
VAR _day =
    MAX ( 'Solar Generation'[Export During Day Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Day Rate" ),
            'Export'[Export Price]
        )
RETURN
    _peak + _flux + _day

Get the correct result:

vyanjiangmsft_0-1685431536626.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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
v-yanjiang-msft
Community Support
Community Support

Hi @DavidUK13 ,

According to your description, I create a sample like yours, here's my solution. Create a measure:

Measure =
VAR _peak =
    MAX ( 'Solar Generation'[Export During Peak Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Peak Rate" ),
            'Export'[Export Price]
        )
VAR _flux =
    MAX ( 'Solar Generation'[Export During Flux Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Flux Rate" ),
            'Export'[Export Price]
        )
VAR _day =
    MAX ( 'Solar Generation'[Export During Day Rate] )
        * MAXX (
            FILTER ( ALL ( 'Export' ), 'Export'[Tariff Type] = "Day Rate" ),
            'Export'[Export Price]
        )
RETURN
    _peak + _flux + _day

Get the correct result:

vyanjiangmsft_0-1685431536626.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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