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
PoojaDarbhe
Resolver I
Resolver I

Relation not working in case of dates which I am trying to show

Hi Techies,

 

Please help me in following scenario. 

I have two tables with following values

 

DateResultDate
31-May29-Feb
31-May31-Mar
31-May30-Apr
30-Jun31-Mar
30-Jun30-Apr
30-Jun31-May
31-Jul30-Apr
31-Jul31-May
31-Jul30-Jun
31-Aug31-May
31-Aug30-Jun
31-Aug31-Jul

 

DateValues
31-Jan1
31-Jan2
29-Feb3
31-Mar4
31-Mar5
30-Apr6
31-May7
31-May8
31-May9
30-Jun10
30-Jun11
31-Jul12
31-Jul13
31-Aug14

 

I need output as following

 

ResultDatevalue
29-Feb3
31-Mar9
30-Apr6
31-Mar9
30-Apr6
31-May24
30-Apr6
31-May24
30-Jun21
31-May24
30-Jun21
31-Jul25

 

I have created on date table which has unique dates and created relationships in between table 1 and date table, table 2 and date table, still it is not giving me expected output.

Please help me.

 

Thanks in advance.

 

Regards,

Pooja Darbhe

4 REPLIES 4
Icey
Community Support
Community Support

Hi @PoojaDarbhe ,

 

Could you explain what each column of data represents?

What is the relationship between them?

What is the calculation logic?

 

 

 

Best Regards,

Icey

amitchandak
Super User
Super User

@PoojaDarbhe , what is the relation between 1st and second. Two me it seems like sum from table 2 but repeated

@amitchandak 

actually I want the output on selection of the date. but when I select any date in sclicer it will not giving the output as expected, i.e. if I select "31 May" in slicer then I want to show on bar chart the values as result date on x axis and its corresponding values on y axis like describe below. 

29 Feb - 3

31 Mar - 9

30 Apr - 6

Let me know if you want any more information, please suggest something what can I do.

 

Thanks and regards,

Pooja Darbhe

@PoojaDarbhe , Based on what I got you to need something like

 

Meausure =
var _max =maxx(allselected(date),date[date])

return
CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date]<=_max))

 

Also, refer as date might group into one date : https://www.youtube.com/watch?v=duMSovyosXE

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.