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

Fetching details from table on basis of Calendar Table which is not connected with calendar Table

Hello all, 
I have a query , I want data according to the selected values form calendar table, where calendar table should not be connected to the table from where data is to be taken, 
example If I am selecting a particular quarter I want data according to the selected quarter without any measures for like calclulate(count('..'"))


I have made 3 measures for this,
StartDatevFinancialReport = IF(MINX(FILTER(vFinancialReport, vFinancialReport[TransactionDate].[Date] = [StartDate]),vFinancialReport[TransactionDate].[Date]) <> BLANK(),1,0)

EndDatevFinancialReport = IF(MAXX(FILTER(vFinancialReport, vFinancialReport[TransactionDate].[Date] = [LastDate]),vFinancialReport[TransactionDate].[Date]) <> BLANK(),1,0)

DatesBetween = IF(DATEDIFF([StartDatevFinancialReport],[EndDatevFinancialReport],DAY)<> 0 , 1, 0)

By this I get the first and last month values on the selected quarter but not the values of other selected months, 

Jessi9624_0-1632302018873.png

 

what should I do ?

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

 

measure =
VAR _max = MAXX(allselected('Date1'),'Date1' [Date])
var _min = MinX(allselected('Date1'),'Date1' [Date])

return
calculate(Sum(Table[Value]), filter(Table, Table[Date]>=_min && Table[Date]<=_max))

 

refer if needed

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Anonymous
Not applicable

Thank you for the response, but I dont't want a measure with calculate /sum/count, because I dont want to create measures for each and every column, can it be directly made like just clicking on the slicer I would get the data without joining the tables

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