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
Anonymous
Not applicable

Need help with Measure

Hello All, 

 

Hope you are doing well 🙂

 

I have a measure as mentioned below in pbix which is used to sum of sales for last 7 days . but unfortunately i was not able to see any result in visual . please let me knw what went wrong.

Test Measure =
var a= MAXX(DateTable,DateTable[Future 8 fridays])
var b=a-6
var c=CALCULATE(SUM('Combined Data'[Funding]),'Combined Data'[Approval Date - Forecast]>=b && 'Combined Data'[Approval Date - Forecast]<=a)
return c
 
vnomulac_0-1653237348938.png

 

7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi  @Anonymous 

Thanks for reaching out to us. I need to confirm the questions in the picture below,

vxiaotang_2-1653446532204.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xiaotang  , Yes i think so. They are trying to create a table visual to show the Week to date sum of the [Funding] field. And just show those WTD values for those Future 8 Fridays fiels as shown in the screenshot above.









Hi @dhruvinushah 

Thanks!

vxiaotang_3-1653446555647.png

In this scenario, create the measures below,

Test Measure = 
var a= MAXX(all(DateTable),DateTable[Future 8 fridays])
var b=a-6
var c=CALCULATE(SUM('Combined Data'[Funding]),'Combined Data'[Approval Date - Forecast]>=b && 'Combined Data'[Approval Date - Forecast]<=a)
return c

result ( in card visual)

vxiaotang_4-1653446616380.png

If you want to put it into table visual, then use this measure

Measure = 
var _maxdate= MAXX(all(DateTable),DateTable[Future 8 fridays])
var _start =_maxdate-6
var _sum=CALCULATE(SUM('Combined Data'[Funding]),'Combined Data'[Approval Date - Forecast]>=_start && 'Combined Data'[Approval Date - Forecast]<=_maxdate)
return IF(MIN(DateTable[Future 8 fridays])= _maxdate, _sum)

result

vxiaotang_5-1653446750191.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Hi,  @v-xiaotang  In the table visual I believe they want to see the sum for each of those [Future 8 Fridays] values. 

So if the sum from 5/21 -5/27 was 10000$ , then they probably want to see that value next to that date. 😅









Anonymous
Not applicable

Hi,

 

Try this 

var a= selectedvalue(DateTable,DateTable[Future 8 fridays])

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
dhruvinushah
Responsive Resident
Responsive Resident

Hi @Anonymous ,

Your measure is working for the MAX date or the last date in the Future 8 Fridays field. 









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.