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
madji
Helper I
Helper I

what if

HI

I try to use parameters in my example.

Id like to create paramerer only for article1.

 

after chenging article1  - article4 have to chenge also

 

my example:

example

 

if parametr is  2 -

article1 will be 2*100 = 200

and

article4 = article1+article2-article3 = 200+100 - 10

 

Thanks!

1 ACCEPTED SOLUTION

@madji

 

Please see attached file

 

Both artilce 1 and 4 change with selection of a parameter


Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
Zubair_Muhammad
Community Champion
Community Champion

@madji

 

Try this MEASURE

 

 

Measure =
VAR A1 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article1" )
        * [article1]
VAR A2 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article2" )
VAR A3 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article3" )
RETURN
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article4", A1 + A2
            - A3,
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article1", A1,
        SUM ( 'Таблица1'[Amount] )
    )

 

 

 


Regards
Zubair

Please try my custom visuals

@madji

 

Please see attached file

 

Both artilce 1 and 4 change with selection of a parameter


Regards
Zubair

Please try my custom visuals
Zubair_Muhammad
Community Champion
Community Champion

HI @madji

 

Try this MEASURE

 

Measure =
VAR A1 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article1" )
        * [article1]
VAR A2 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article2" )
VAR A3 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article3" )
RETURN
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article4", A1 + A2
            - A3,
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article1", A1,
        SUM ( 'Таблица1'[Amount] )
    )

Regards
Zubair

Please try my custom visuals
Zubair_Muhammad
Community Champion
Community Champion

Hi @madji

 

You can use this MEASURE

 

Measure =
VAR A1 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article1" )
        * [article1]
VAR A2 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article2" )
VAR A3 =
    CALCULATE ( SUM ( 'Таблица1'[Amount] ), 'Таблица1'[Article] = "article3" )
RETURN
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article4", A1 + A2
            - A3,
        SELECTEDVALUE ( 'Таблица1'[Article] ) = "article1", A1,
        SUM ( 'Таблица1'[Amount] )
    )

Regards
Zubair

Please try my custom visuals

That is right, but I have use paprametr for article 1 too

 

for example,  I want to chenge article 1 throught parametr Screenshot_1.png

after this my article4 have to be chenge also

 

  Sumvalue1
Article1100105
Article2100100
Article31010
Article4190195

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.