Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Please how do I translate this into a DAX formula??
=IF((G4-F4-E4)<=0,1,0)*IF((G5-F5-E5)<=0,1,0)*IF((G6-F6-E6)<=0,1,0)
My goal is to subtract the current month and the previous 2 months then apply the corresponding multiplication as indicated.
Solved! Go to Solution.
@GA1993 , for this we need to what is raw data and what is column on row.
productX can help. But if have months as column , then we can have
productX(Table, [Aug-21] -[Jul-21]-[Jun-21])
If not then we create a measure and we need a context to run that like
productX(values(Table[ID]) , CALCULATE(SUM(Table[Value]),DATESMTD('Date'[Date]))
-CALCULATE(SUM(Table[Value]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
-CALCULATE(SUM(Table[Value]),DATESMTD(dateadd('Date'[Date],-2,MONTH))) )
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
@GA1993 , for this we need to what is raw data and what is column on row.
productX can help. But if have months as column , then we can have
productX(Table, [Aug-21] -[Jul-21]-[Jun-21])
If not then we create a measure and we need a context to run that like
productX(values(Table[ID]) , CALCULATE(SUM(Table[Value]),DATESMTD('Date'[Date]))
-CALCULATE(SUM(Table[Value]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
-CALCULATE(SUM(Table[Value]),DATESMTD(dateadd('Date'[Date],-2,MONTH))) )
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Is there a way to do it by subtracting the current and previous month?
I am trying to reuse your code but I keep getting this error below...
The formula on excel is =IF((AW9-AW8)<=0,1,0)
and my data should be..
Please your help would be really appreciated!!
I was able to make it work!! Thank you so much!!
This is how it's supposed to look like..
=IF((AQ9-AQ8-AQ7)<=0,1,0)*IF((AR9-AR8-AR7)<=0,1,0)*IF((AS9-AS8-AS7)<=0,1,0)
AQ = Unauthorized Access Infraction
AR = Loss of AirPro Assets Infraction
AS = Breach in Security Protocol Infraction
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |