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
EV
Advocate II
Advocate II

Return number of days invoiced irrespective of the slicer

Hello All, I have been breaking my head to find a solution. I need to return Avg Daily Sales with calculation of SalestotalMTD/Days Invoiced. I have a slicer for Division,based on the selection, days invoiced value changes accordingly. My problem is that I need to return Avg Daily Sales Total with this calculation, SalestotalMTD/(Value of Days Invoiced for 'C' division), FILTER is not working because of slicer
Days Invoiced should consider 'C' Division only irrespective of slicer selection

 

Days InvoicedDivisionAvg Daily SalesDays Invoiced TotalAvg Daily Sales TotalSalesTotal MTD
8A$45,739.516$60,986.02$365,916.10
6B$148,800.436$148,800.43$892,802.59
6C$179,075.286$179,075.28$1,074,451.69

 

Can someone help please?

1 ACCEPTED SOLUTION
EV
Advocate II
Advocate II

This worked, however when slicer is selected it shows value only for C division and not for the A and B, it returns blank for A and B.  

 

I updated Days Invoiced with the below, key was ALLSELECTED(Fact_Union),

 

CALCULATE (
DISTINCTCOUNT('Fact_Union'[Date]),
FILTER (
ALLSELECTED(Fact_Union),
AND(OR('Fact_Union'[SalesTotal] >0, 'Fact_Union'[SalesTotal] <0 ),Fact_Union[Division]="C")
)
)
 

View solution in original post

1 REPLY 1
EV
Advocate II
Advocate II

This worked, however when slicer is selected it shows value only for C division and not for the A and B, it returns blank for A and B.  

 

I updated Days Invoiced with the below, key was ALLSELECTED(Fact_Union),

 

CALCULATE (
DISTINCTCOUNT('Fact_Union'[Date]),
FILTER (
ALLSELECTED(Fact_Union),
AND(OR('Fact_Union'[SalesTotal] >0, 'Fact_Union'[SalesTotal] <0 ),Fact_Union[Division]="C")
)
)
 

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.