cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jessi9624
Regular Visitor

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

@Jessi9624 , 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

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Top Solution Authors