Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear all,
I have been searching for the correct solution the whole day, but unfortunately I have not found it yet. When incerting the following DAX code as new measure I get the incorrect colomn total:
IF(
[Gasketel kWh]>0,
SUMX(VasteWaarden,[dT]),
0)
[Gasketel kWh] is a calculated measure.
I get the measure/column total of VasteWaarden[dT].I have also tried the hasonefilter code, but it does not seem to work (no values):
Gasketel draaiuren = IF(HASONEFILTER('VasteWaarden'[dT]),
IF([Gasketel kWh]>0,SUM(VasteWaarden[dT]),0),
SUMX(FILTER('VasteWaarden',[Gasketel kWh]<0),0))
Does anyone know what I should do differently? Many thanks if anyone knows what to do..!
Regards, Pim
Solved! Go to Solution.
Hi, @pimgo
Thank you for sharing.
Please check the link down below, that I included the fixed version of two measures.
I hope I correctly understood your question.
https://www.dropbox.com/s/hzfvlnxo55rc8fj/Uitlegmodel.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi, @pimgo
I am not quite sure whether I understood your question correctly, but try the below for newly creating a column.
new column =
IF(
[Gasketel kWh]>0,
calculate ( SUM([dT])),
0)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
Unfortunately when adding a column it doesn't show any values.
My problem is a followed: When using the if forumla I get an incorrect colomn total. Question: I want to get the correct sum from all the individual lines.
Hi, @pimgo
Thank you for your feedback.
Please try two steps.
First measure = your first created measure
Second measure = sumx (values(vastewaarden[dt]), [first measure])
It is quite difficult for me to tell something without seeing your sample pbix file.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
Dear @Jihwan_Kim ,
It took some time to do it, but here is the link to the pbix file: [deleted] I hope this works for you? I inserted the calculatings which are correct. Unfortunately your suggestion does not work.
Hopefully with the example it becomes clear what I mean.
Hi, @pimgo
Thank you for sharing.
Please check the link down below, that I included the fixed version of two measures.
I hope I correctly understood your question.
https://www.dropbox.com/s/hzfvlnxo55rc8fj/Uitlegmodel.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Thank you very much, I didn't know I had to do something with the 'first ' colomn too. For the people intrested in the solution:
Gasketel draaiuren fix =
SUMX (
SUMMARIZE(
VasteWaarden,
VasteWaarden[Uur],
VasteWaarden[dT],
"@gasketel draaiuren", IF ( [Gasketel kWh] > 0, SUM ( VasteWaarden[dT] ), 0 )
),
[@gasketel draaiuren]
)
I had two columns (in the same table) of which the first one shows the unique values. Thank you @Jihwan_Kim
User | Count |
---|---|
98 | |
76 | |
69 | |
53 | |
27 |