Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi everyone, I hope you are having a nice day
I was working on my report when I encountered the following problem. I have a table like the following:
PersonId | Category | Date | Value |
1 | 5 | 2023-12-01 | 10 |
1 | 6 | 2023-12-01 | 8 |
1 | 5 | 2023-12-02 | 6 |
3 | 5 | 2023-12-01 | 5 |
4 | 4 | 2023-12-01 | 1 |
What I need is to get, in a measure if possible, the value for each DATE in category 5. That is, I would like the final result to be as follows:
PersonId | Date | New Measure |
1 | 2023-12-01 | 10 |
1 | 2023-12-02 | 6 |
3 | 2023-12-01 | 5 |
Thank you very much in advance for your help,
Best regards
Solved! Go to Solution.
Hi, @AlvRomero
Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
MEASURE =
VAR _5 =
SELECTEDVALUE ( 'Table'[Category] )
VAR _value =
CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Category] = _5 ) )
RETURN
IF ( _5 = 5, _value )
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, thank you for your response.
When I apply the solution that you have provided me what happens is that it adds the sum of all the category to all the people, that is to say, the result that we obtain is the following one:
(I will put the result of the measure that you have provided me and the one we are looking for)
Thanks for your input, I hope we can find a solution to the problem,
Best Regards
Hi, @AlvRomero
You can change the SUM to Max, everything works fine on my side of the implementation, do you have any other filters on your data in Power BI Desktop that affect the implementation results?
Measure:
MEASURE1 =
VAR _5 =
SELECTEDVALUE ( 'Table'[Category] )
VAR _value =
CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Category] = _5 ) ,ALL('Table'))
RETURN
IF ( _5 = 5, _value )
Best Regards,
Yang
Community Support Team
Hi, thank you for your response.
When I apply the solution that you have provided me what happens is that it adds the sum of all the category to all the people, that is to say, the result that we obtain is the following one:
(I will put the result of the measure that you have provided me and the one we are looking for)
Thanks for your input, I hope we can find a solution to the problem,
Best Regards
Hi, @AlvRomero
You can change the SUM to Max, everything works fine on my side of the implementation, do you have any other filters on your data in Power BI Desktop that affect the implementation results?
Measure:
MEASURE1 =
VAR _5 =
SELECTEDVALUE ( 'Table'[Category] )
VAR _value =
CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Category] = _5 ) ,ALL('Table'))
RETURN
IF ( _5 = 5, _value )
Best Regards,
Yang
Community Support Team
Hi, @AlvRomero
Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
MEASURE =
VAR _5 =
SELECTEDVALUE ( 'Table'[Category] )
VAR _value =
CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Category] = _5 ) )
RETURN
IF ( _5 = 5, _value )
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
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 |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |