Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello community, I always guide myself from their publications but it is the first time I look for and look for and I do not find if they can help me with this problem that has come out:
As the title says I want to filter in some way the sales of the previous month that I get with this formula:
I am using as an example only one day I leave you a test pbix that I put together to try to perform the measurement.
PBix :
https://we.tl/t-UzhXXDMTBG
Solved! Go to Solution.
Hi,
Write this measure
Measure = SUMX(FILTER(VALUES('data pruebas'[DISTRIBUIDOR]),[Avance]>0),[Avance LM <])
I'm not sure how you wish to define 'current period' but if just generic across the whole model, then you need to provide that current period context by iterating on the Calendario table. Iterator functions end in X usually, such as SUMX.
I believe this formula is what you're looking for, but if not just reply with what the desired result should be:
Note, this does not filter per Distribuidor each date period, but rather aggregates them all, so if that's something you need, we need to know EVERY dimension you want included and we need to add that to the context of the iterator measure.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi,
Try this measure
Avance LM < =
if(ISBLANK([Avance]),BLANK(),CALCULATE([Avance],DATEADD(Calendario[Date],-1, MONTH)))
As I tell you it is true that it serves when it is blank, but when they are grouped it no longer respects the condition the correct result should only be: 59947
Hi,
Write this measure
Measure = SUMX(FILTER(VALUES('data pruebas'[DISTRIBUIDOR]),[Avance]>0),[Avance LM <])
Hello I worked well at the level records this formula but to show every day is not adding correctly the value, I was thinking of using a hasonevalue but it would not be the solution since this measure will be used in many ways and you would have to create many hasonvalue :
Which measure are you using for this screenshot? Have you tried my suggestion using the SUMX(Calendario ... this will provide the context for the totals row you're looking for.
@Syndicate_Admin wrote:
Hello I worked well at the level records this formula but to show every day is not adding correctly the value, I was thinking of using a hasonevalue but it would not be the solution since this measure will be used in many ways and you would have to create many hasonvalue :
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi,
Share the link from where i can download your PBI file.
WAO that great if it works on the PBix test tomorrow I will try it on the original PBix that weighs almost 900 MB thank you very much !
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
81 | |
70 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |