Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Solved! Go to Solution.
Hi @Dain,
Use the following measure:
Output = SWITCH(SUM(Groups[Value]); 0; 0 ; 1 ; 1 ; 2)
Result is as below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Dain,
Use the following measure:
Output = SWITCH(SUM(Groups[Value]); 0; 0 ; 1 ; 1 ; 2)
Result is as below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi All.I am new to powerBI nad new to this community.I am struggling with a logic to get it implemented in DAX.
Here comes my logic
I have a table
date group value
1/4/2018 A 2
1/4/2018 B 0
1/4/2018 C 1
2/4/2018 A 1
2/4/2018 B 1
2/4/2018 C 2
3/4/2018 A 0
3/4/2018 B 2
3/4/2018 C 2
I have a date slicer with start n end dates in the report.For the dates selected in the slicer i want to calculate the sum
of values for each group for that period.Also i wnat to generalize the sum that is if 0 then 0,if 1 then 1 if greater than 1 Then 2.
If the dates selected :1/4/2018 to 2/4/2018
then the output should be
group value output
A 3 2
B 1 1
C 3 2
Kindly help please.. Thanks.
This is what I figured out. Is this what you mean?
The sum of value by group goes automatically.
The logic you mentioned can be described as:
output = if(sum([value]) >1 ,2;sum([value]))
Hope this helps.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |