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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Daily Sale for Each Region

Hi Experts

 

See attached sample file.

I am trying to show the daily sales for each region ignoring the slicer for the current month in a Table format....

 

See DAX Measure MTD Sales All Regions

I have created a Region Table, if that helps?

 

The region daily sales data are in their own tables, i do not want to consolidate into a central FACT table. is there a way to use the switch function either using a discount table and or a table with relationships as per my model now... in order to show the daily sales for the region in the cross tab table. everything else stays...

 

sample file

 See link below

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , You have shared a pdf, is that file we should look?

 

Also, the information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Anonymous
Not applicable

https://www.dropbox.com/s/ztw5z2tj4lntmq7/Sample_1.1.pbix?dl=0 

 

Hi Amit - i want to populate the daily sales figures for the current month ignoring filter context into a matrix table... this measure gives the correct answer for one Region how do i get all regions in a single table... with out consolidating individual NA and SA and EMEA tables...

VAR _AP = CALCULATE(SUM(AP[Total]),
FILTER(ALL(
DimDate[Date]),
DimDate[Date] <= TODAY()
&& MONTH(DimDate[Date]) = MONTH(TODAY())))

@Anonymous , Try a measure like this

 

MTD Today =
var _min = eomonth(today(),-1)+1
var _day = datediff(_min, today(),day)+1
return
CALCULATE(SUM(AP[Total]), FILTER(ALL('Date'),'Date'[Date] >= _min && 'Date'[Date] <=_max && 'Date'[Day of Year] <= _day) )

 

In this you formula or this formula  it should not consolidate all region, because there is not all on region

Anonymous
Not applicable

Hi Amit can you kindly provide sample PBIX.....

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.