Forum Discussion
How to retrieve single value from a table
Hi,
I have the following table -
| Metric | FY20Q3 | FY20Q2 |
| Page Visits | 2500 | 700 |
| Unique Visitors | 700 | 200 |
| Visits | 1200 | 150 |
I am creating a KPI card for which I need to query to retrieve results only specific to FY20Q2. Ultimately, I'll need 3 new measures namely -
1. Last qtr page visits
2. Last qtr Unique Visitors
3. Last qtr Visits.
In SQL, I would have queried something like this -
Last qtr page visits = SELECT FY20Q2 FROM tablename WHEN tablename.metric=Page Visits
Please help me with the query in Power BI.
Thanks
saipawar the measure will look like this
Last qtr page visits = CALCULATE ( MAX ( Table[FY20Q2] ), Table[Metric] = "Page Visits" )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
1 Reply
- parry2k
Super User
saipawar the measure will look like this
Last qtr page visits = CALCULATE ( MAX ( Table[FY20Q2] ), Table[Metric] = "Page Visits" )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!