Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have a data like this in Power BI:
PROJECT_BK | PROJECT_NAME | REVENUE_CATEGORY_BK | SNAPSHOT_DATE_BK |
PROJ-0021 | POC - Cloud | RC_PS_TM | 07/12/2022 |
PROJ-0021 | POC - Cloud | RC_PS_TM | 08/12/2022 |
PROJ-0021 | POC - Cloud | RC_PS_TM | 13/11/2022 |
PROJ-0021 | POC - Cloud | RC_DX_EF | 14/10/2022 |
PROJ-0021 | POC - Cloud | RC_DX_EF | 15/10/2022 |
PROJ-0021 | POC - Cloud | RC_DX_EF | 20/09/2022 |
PROJ-0021 | POC - Cloud | RC_DX_EF | 21/09/2022 |
PROJ-1111 | 3DL - Tokenized | DB_TD_ER | 23/12/2022 |
PROJ-1111 | 3DL - Tokenized | DB_TD_ER | 01/12/2022 |
What I want to have are the ff:
Expected Output Sample 1:
Assuming that the single dropdown date is selected to 08/12/2022
The SELECTED_DATE_REVENUE_CATEGORY_BK field should have a value of:
Expected Output Sample 2:
Assuming that the single dropdown date is selected to 23/12/2022
The SELECTED_DATE_REVENUE_CATEGORY_BK field should have a value of:
Kindly help me please...
Solved! Go to Solution.
Hi , @cruzp
Thanks for your sample data !
According to your description, you want to "Create a measure/column that gets the category value based on the selected date".
Here are the steps you can refer to :
(1)We need to click "New Table" to create a dimension table as the date slicer:
Date = VALUES('Table'[SNAPSHOT_DATE_BK])
(2)Then we can create a measure like this:
SELECTED_DATE_REVENUE_CATEGORY_BK = CALCULATE( MAX('Table'[REVENUE_CATEGORY_BK]) , 'Table'[SNAPSHOT_DATE_BK]= MAX('Date'[SNAPSHOT_DATE_BK]))
(3)Then we can put the fields on the visual and we can get the result as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @cruzp
Thanks for your sample data !
According to your description, you want to "Create a measure/column that gets the category value based on the selected date".
Here are the steps you can refer to :
(1)We need to click "New Table" to create a dimension table as the date slicer:
Date = VALUES('Table'[SNAPSHOT_DATE_BK])
(2)Then we can create a measure like this:
SELECTED_DATE_REVENUE_CATEGORY_BK = CALCULATE( MAX('Table'[REVENUE_CATEGORY_BK]) , 'Table'[SNAPSHOT_DATE_BK]= MAX('Date'[SNAPSHOT_DATE_BK]))
(3)Then we can put the fields on the visual and we can get the result as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
HI @v-yueyunzh-msft this seems to work. how about for another field which for example the "Current Stage"
Parameters should be included in the measure:
[Stage Bk] = 'R4'
[Stage Bk] = 'R5'
Current_Stage =
CALCULATE( MAX(DIM_STAGE[STAGE_BK]),
'Table'[SNAPSHOT_DATE_BK]= MAX('Date'[SNAPSHOT_DATE_BK]))
)
how do i add the parameters in the formula?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |