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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ThejaPGamage
Frequent Visitor

Can I show sales for the day,month & cumulative financial year in same matrix visual

Dear all,

 

I have a Sales data Set with april 2022 to now. I am updating this every day morning. I need to show below data in same visual ( I use matrix)

 

Product CodeSales Month to DateSales as at yesterdaysales year to date
    
    
    

 

Thanks

4 REPLIES 4
ThejaPGamage
Frequent Visitor

Sample data set

product codeinv date inv value
p101/04/2022-50
p209/04/2022-100
p101/05/2022-300
p211/05/2022-250
p105/06/2022-75
p206/06/2022-50
p108/07/2022-100
p212/07/2022-300
p123/07/2022-250
p230/08/2022-75
p131/08/2022-50
p201/09/2022-100
p111/09/2022-300
p221/09/2022-250
p130/09/2022-75
p201/10/2022-50
p106/10/2022-100
p215/10/2022-300
p102/11/2022-250
p207/11/2022-75
p130/11/2022-50
p201/12/2022-100
p109/12/2022-300
p201/01/2023-250
p102/01/2023-75
p215/01/2023-50
p119/01/2023-100
p204/02/2023-300
p107/02/2023-250
p208/02/2023-75
p115/02/2023-750

hi @ThejaPGamage 

try to plot a visual with product code column and multiple measures like:

MTD = 
CALCULATE(
    SUM(TableName[inv value]),
    TableName[inv date]<= TODAY(),
    YEAR(TableName[inv date])= YEAR(TODAY()),
    MONTH(TableName[inv date])=MONTH(TODAY())
)

LastD = 
CALCULATE(
    SUM(TableName[inv value]),
    TableName[inv date]= TODAY()-1
)

YTD = 
CALCULATE(
    SUM(TableName[inv value]),
    TableName[inv date]<= TODAY(),
    YEAR(TableName[inv date])= YEAR(TODAY())
)

TD = 
CALCULATE(
    SUM(TableName[inv value]),
    TableName[inv date]<= TODAY()
)

 

it worked like:

FreemanZ_0-1676537948108.png

ThejaPGamage
Frequent Visitor

Sample DATA set

 

product codeinv dateinv value
p101/04/202250
p209/04/2022100
p101/05/2022300
p211/05/2022250
p105/06/202275
p206/06/202250
p108/07/2022100
p212/07/2022300
p123/07/2022250
p230/08/202275
p131/08/202250
p201/09/2022100
p111/09/2022300
p221/09/2022250
p130/09/202275
p201/10/202250
p106/10/2022100
p215/10/2022300
p102/11/2022250
p207/11/202275
p130/11/202250
p201/12/2022100
p109/12/2022300
p201/01/2023250
p102/01/202375
p215/01/202350
p119/01/2023100
p204/02/2023300
p107/02/2023250
p208/02/202375
p115/02/2023750

 

expected out put

 

Product CodeSales Month to DateSales as at yesterdaysales year to date
p110007503075
p237502325
FreemanZ
Super User
Super User

yes, with three measures each. paste some sample data and let us see.

Helpful resources

Announcements
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.

Top Solution Authors