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.
Hi there,
Everyone, I have researched in various forums and community posts and tried the dax adapting it to my modeling, so far I have not obtained what I need, for this reason I leave the file with my modeling, as well as the image with the results that I want to obtain when making the filter (It is what appears as a title in the tables of the image). The Formula I leave is an example of what I have adapted.
To know that the result is correct in the image we have Brand 3 with 586,435.33, but in the PBIX file attached with the attached formula it gives me 585,721.54 this is because there is a client that in December 2018 is listed as a transfer but in December 2019 It's like New Door, which I need you to ignore last year's transfer.
I hope you can help me.
Attached file
Dax currently
Sales Value LY LFL =
VAR CustomersInvoices =
ADDCOLUMNS (
VALUES ( Fac_Sales[ID_LFL] ), -- Use Customers table if you have one
"AmountCurrentMonth", [Sales Value],
"AmountPreviousMonth", CALCULATE ( [Sales Value],CROSSFILTER('Calendar'[Date],'dDate'[Date],OneWay),SAMEPERIODLASTYEAR(dDate[Date]) )
)
VAR CustomersWithGrowth =
FILTER ( CustomersInvoices, [ID_LFL] =[ID_LFL] )
VAR Result =
SUMX ( CustomersWithGrowth,[AmountPreviousMonth])
RETURN Result
Expected results
I will try to make YTD dependent LYTD like
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31")
filter(Sales, not(isblank([Last YTD Sales]))))
Sample data as text. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks, out of editing my post. @Greg_Deckler .
@amitchandak Solution did not work.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |