Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
Am new to Power BI and MSQL
I have a power query to import data from Microsoft Services where in i am currently using "OR" operator (Max 2) data values under a column to be checked while importing.
But my query should import data from service when this column is checked more than 2 values like FY 2015, FY 2016--- FY 2019.
Current PQuery:
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
"NPS Passive Count", 'NPS'[NPS Passive Count],
"NPS Advocate Count", 'NPS'[NPS Advocate Count],
"NPS Detractor Count", 'NPS'[NPS Detractor Count]
)
,OR ('Survey Response Date'[Financial Year] = "FY 2018" ,'Survey Response Date'[Financial Year] = "FY 2019")
)
Could you please help me with this at the earliest?
Thanks:
Nishanth
Solved! Go to Solution.
This is not Power Query, it's a DAX query. "Power Query" (also known by it's codename of "M") is the term given to the language used by the queries when you click on the "Get Data" button in Power BI.
To use the IN operator in DAX you would do the following:
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
"NPS Passive Count", 'NPS'[NPS Passive Count],
"NPS Advocate Count", 'NPS'[NPS Advocate Count],
"NPS Detractor Count", 'NPS'[NPS Detractor Count]
)
,'Survey Response Date'[Financial Year] IN { "FY 2018", "FY 2019"} )
)
Hi nmaheshwarappa,
You can multiple ORs in your logical condition.
Like,
OR('Survey Response Date'[Financial Year] = "FY 2016",(OR('Survey Response Date'[Financial Year] = "FY 2017",OR ('Survey Response Date'[Financial Year] = "FY 2018" ,'Survey Response Date'[Financial Year] = "FY 2019"))))
Regards,
Pradeep
This is not Power Query, it's a DAX query. "Power Query" (also known by it's codename of "M") is the term given to the language used by the queries when you click on the "Get Data" button in Power BI.
To use the IN operator in DAX you would do the following:
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
"NPS Passive Count", 'NPS'[NPS Passive Count],
"NPS Advocate Count", 'NPS'[NPS Advocate Count],
"NPS Detractor Count", 'NPS'[NPS Detractor Count]
)
,'Survey Response Date'[Financial Year] IN { "FY 2018", "FY 2019"} )
)
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
94 | |
88 | |
35 | |
32 |
User | Count |
---|---|
153 | |
101 | |
82 | |
63 | |
52 |