Division to 1,000,000


My “If else” function in QuickSight does not calculate well when I divide 1,000,000.

The function works like that:“ifelse(${UnitOfMeasurement}=‘kWh’, {consume} , ${UnitOfMeasurement}=‘MWh’,{consume}/1000, {consume}/1,000,000)”

And the calculation of {consume}/1,000,000 doesn’t work well. I tried to use another calculate field that already divided by 1,000 and I tried to divide him in 1000 but it gave the same result.

I attached the results for any of the parameters.

Has anyone encountered a problem like that?

Hmm, this is really weird. I don’t recall having encountered this. I would assume it’s some sort of rounding error. Just to confirm you don’t have commas in your ifelse statement.

ifelse(${UnitOfMeasurement}=‘kWh’, {consume} , ${UnitOfMeasurement}=‘MWh’,{consume}/1000, {consume}/1000000)

Besides that, I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

Hi @Max,
Thx for your reply! actually it is really weird. Yea, I didn’t put commas at the 1000000, of course. Just wrote it in the question description by mistake.

I will open ticket probably. Thank you for the good advice!


1 Like