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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
arafmustavi
Frequent Visitor

Daily trend for Percentage of Sales in a line graph

I have a Datasaet that has daily sales data with category.

The Datatable sample

Date | Category | Sales Value
01-APR-24 | G1 | 100

01-APR-24 | G1 | 120

01-APR-24 | G2 | 150

01-APR-24 | G3 | 250

02-APR-24 | G1 | 120

02-APR-24 | G2 | 130

02-APR-24 | G3 | 150


The line graph should show daily percentage of sales by each category

Example

Date | Category | Sales Value
01-APR-24 | G1 | (220/620)

01-APR-24 | G2 | (150/620)

01-APR-24 | G3 | (250/620)


How should I design my DAX for this?

 

 

1 ACCEPTED SOLUTION
AntrikshSharma
Community Champion
Community Champion

@arafmustavi 

 

% Of Total Sales = 
DIVIDE ( 
    SUM ( 'Table'[Sales Value] ),
    CALCULATE ( 
        SUM ( 'Table'[Sales Value] ),
        REMOVEFILTERS ( 'Table' )
    )
)

View solution in original post

1 REPLY 1
AntrikshSharma
Community Champion
Community Champion

@arafmustavi 

 

% Of Total Sales = 
DIVIDE ( 
    SUM ( 'Table'[Sales Value] ),
    CALCULATE ( 
        SUM ( 'Table'[Sales Value] ),
        REMOVEFILTERS ( 'Table' )
    )
)

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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