Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I am quite new to PBI so would need help to create a new column (new value) based on the below sample data. Thank you.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
It is for creating a new calculated column.
Please check the below picture and the attached pbix file.
new_value CC =
VAR _grouptable =
FILTER ( data, data[group] = EARLIER ( data[group] ) )
VAR _maxvalue =
MAXX ( _grouptable, data[value] )
VAR _maxproperty =
SUMMARIZE ( FILTER ( _grouptable, data[value] = _maxvalue ), data[property] )
RETURN
IF (
data[value] = _maxvalue,
data[value]
- SUMX (
FILTER ( _grouptable, NOT ( data[property] IN _maxproperty ) ),
data[value]
)
)
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
It is for creating a new calculated column.
Please check the below picture and the attached pbix file.
new_value CC =
VAR _grouptable =
FILTER ( data, data[group] = EARLIER ( data[group] ) )
VAR _maxvalue =
MAXX ( _grouptable, data[value] )
VAR _maxproperty =
SUMMARIZE ( FILTER ( _grouptable, data[value] = _maxvalue ), data[property] )
RETURN
IF (
data[value] = _maxvalue,
data[value]
- SUMX (
FILTER ( _grouptable, NOT ( data[property] IN _maxproperty ) ),
data[value]
)
)
Thanks Jihwan for your prompt response. Your intepretation is correct.
What if the property column does not use/contain numbers? Example below.
Hi, @lsihui_
Have you solved your problem? If it has been resolved, please accept the reply that helped you as a solution. If it has not been resolved, please provide more information.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I think it is still the same.
Please check the below picture and the attached pbix file.
Thank you.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |