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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Manasa1994
Frequent Visitor

Creating Invoice Net Amount USD Line in Power BI

Hi, I hope this message finds you well. I am reaching out to seek your expertise and assistance in replicating a specific feature from a Tableau report into Power BI. The challenge I am currently facing is in creating an "Invoice Net Amount USD" line that displays percentages as shown in the Tableau report.

I have attempted to achieve this in Power BI using various approaches, but I haven't been successful in replicating the exact behavior. It appears that the DAX formula I have been using might not be suitable for this specific requirement.

Could you please guide me on the appropriate DAX formula or any other method to achieve a similar percentage display for the "Invoice Net Amount USD" line in Power BI?

I appreciate any insights or suggestions you can provide to help me overcome this hurdle. Thank you in advance for your time and assistance.

Manasa1994_0-1705688705605.png

 

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

hello @Manasa1994 

what you are trying to achieve is a cumulative %. 

 

Daniel29195_0-1705706238459.png

 

 

sample data used : 

Daniel29195_1-1705706258029.png

 

measure : 

Daniel29195_2-1705706273310.png

 

code : 

Measure 14 =

var cumlative =
CALCULATE(
    SUM('Table (15)'[qty]),
    WINDOW(
        0,
        ABS,
        0,
        REL,
        CALCULATETABLE(
        SUMMARIZE(
            'Table (15)',
            'Table (15)'[item]
        ),
        ALLSELECTED( 'Table (15)'[item]))
        ,
        ORDERBY('Table (15)'[item], ASC )
    )
)

var total =  CALCULATE(
    SUM('Table (15)'[qty]), ALLSELECTED( 'Table (15)'[item])
    )

    RETURN
    divide(cumlative, total, 0 )
   
 
 
hope this works.

Nb:   the orderby in the window function, should be the same as the order of the visual . 

Daniel29195_3-1705706366394.png

 

if the x-axis is randomly ordered, i would suggest to create a column to order this column . 
this can be done as follow : 

go to table view : 

select the column in question

go to sort by column

choose the index . 

Daniel29195_4-1705706500915.png

 

 

 

hope this helps 

 

best regards.

 

View solution in original post

2 REPLIES 2
Manasa1994
Frequent Visitor

but for me it's coming like this

Manasa1994_0-1706884468015.png

 

Daniel29195
Super User
Super User

hello @Manasa1994 

what you are trying to achieve is a cumulative %. 

 

Daniel29195_0-1705706238459.png

 

 

sample data used : 

Daniel29195_1-1705706258029.png

 

measure : 

Daniel29195_2-1705706273310.png

 

code : 

Measure 14 =

var cumlative =
CALCULATE(
    SUM('Table (15)'[qty]),
    WINDOW(
        0,
        ABS,
        0,
        REL,
        CALCULATETABLE(
        SUMMARIZE(
            'Table (15)',
            'Table (15)'[item]
        ),
        ALLSELECTED( 'Table (15)'[item]))
        ,
        ORDERBY('Table (15)'[item], ASC )
    )
)

var total =  CALCULATE(
    SUM('Table (15)'[qty]), ALLSELECTED( 'Table (15)'[item])
    )

    RETURN
    divide(cumlative, total, 0 )
   
 
 
hope this works.

Nb:   the orderby in the window function, should be the same as the order of the visual . 

Daniel29195_3-1705706366394.png

 

if the x-axis is randomly ordered, i would suggest to create a column to order this column . 
this can be done as follow : 

go to table view : 

select the column in question

go to sort by column

choose the index . 

Daniel29195_4-1705706500915.png

 

 

 

hope this helps 

 

best regards.

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.