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
Volvo_Chang
Frequent Visitor

Measure

Hello Team,

Need your expertise!

I have net cases number pulled from daily invoice database. I want to show the net cases in the table is as the table below as separate view based on the date range. However, I have using the measure as below but get the net cases combined instead of separated view as table1. Can you please help how to adjust my measure to get it to work? Thanks.

 

NetCasesRFP = calculate(sum('summary InvoiceDCByDay'[NetCases]),filter('Pricing',average('summary InvoiceDCByDay'[InvoiceDate])>=Pricing[Valid After] && average('summary InvoiceDCByDay'[InvoiceDate])<=Pricing[Valid Before]))

 

Table 1

Net Cases

Price Start Date

Price End Date

100

4/1/2019

5/1/2019

108

5/1/2019

6/1/2019

5

6/1/2019

7/1/2019

 

Table now

Hello Team,

I have net cases number pulled from daily invoice database. I want to show the net cases in the table is as the table below as separate view based on the date range. However, I have using the measure as below but get the net cases combined instead of separated view in the table. Can you please help how to adjust my measure to get it to work? Thanks.

My measure for this one now:

NetCasesRFP = calculate(sum('summary InvoiceDCByDay'[NetCases]),filter('Pricing',average('summary InvoiceDCByDay'[InvoiceDate])>=Pricing[Valid After] && average('summary InvoiceDCByDay'[InvoiceDate])<=Pricing[Valid Before]))

 

Net Cases

Price Start Date

Price End Date

 

4/1/2019

5/1/2019

213

5/1/2019

6/1/2019

 

6/1/2019

7/1/2019

Measure 

1 ACCEPTED SOLUTION

Hi there

Could you not create a date table. and then link your data based on the dates of the transaction.

In your Date table you could have a column with the Start and End Dates.

Then your measure would just be the sum('summary InvoiceDCByDay'[NetCases]

And you would use the column from your date table?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

4 REPLIES 4
GilbertQ
Super User
Super User

Hi there

Thanks for the details, what is your expected output that you are looking for?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hello @GilbertQ ,

 

Thanks for your reply,

I create the measure below to show the net cases by the date range I select:

NetCases1 = calculate(sum('summary InvoiceDCByDay'[NetCases]),filter('Pricing',AVERAGE('summary InvoiceDCByDay'[InvoiceDate])>=Pricing[Valid After] && average('summary InvoiceDCByDay'[InvoiceDate])<=Pricing[Valid Before]))
 
but it shows combined net cases as below: I don't want to show it all combined.

NetCases1Price Start DatePrice End Date
2134/1/20195/1/2019
2135/1/20196/1/2019
2136/1/20197/1/2019

 

 

I have two date sliicer, one is valid after to get the max day of Price Start Date, second one is Valid before to get the min of price End date.

The NetCase1 number is from the invoice date in between of the price start date and price end date.

*I am looking for a measure to show the net cases row by row by the day range I select like this below: 

NetCases1Price Start DatePrice End Date
1004/1/20195/1/2019
1085/1/20196/1/2019
56/1/20197/1/2019

 

 Thank you very much!

Hi there

Could you not create a date table. and then link your data based on the dates of the transaction.

In your Date table you could have a column with the Start and End Dates.

Then your measure would just be the sum('summary InvoiceDCByDay'[NetCases]

And you would use the column from your date table?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hello commnunity,

 

I have a measure question regarding date period,  2019-07-05 11_04_25-Window.png

In the measure, it works perfect if I have two date period that one is after and the other one is before. 

 

Adjusted Cases = CALCULATE (
SUM ( 'summary InvoiceDCByDay'[NetCases]),
FILTER (
ALL ( 'summary InvoiceDCByDay'[InvoiceDate],'summary InvoiceDCByDay'[Brand],'summary InvoiceDCByDay'[Supplier],'summary InvoiceDCByDay'[Distribution Center] ),
('summary InvoiceDCByDay'[Distribution Center]) = max(Pricing[DCLocationName]) && ('summary InvoiceDCByDay'[Supplier]) = MAX(Pricing[MainItemSupplierName])
&& ('summary InvoiceDCByDay'[brand]) = max(Pricing[Brand])
&& ('summary InvoiceDCByDay'[InvoiceDate]) >= ([ValidAfterSelected])
&& ('summary InvoiceDCByDay'[InvoiceDate]) <= ([ValidBeforeSelected]))) + 0

 

Now, I want to just adjust the measure above and disreagard the validafter period and change the valid before from the "before" date slicer to "between" date slicer. 

How can I addjust my measure above based on the valid after "between" slicer?

 

Thanks,

Kevin 

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.

Top Solution Authors
Top Kudoed Authors