Forum Discussion
Help with a simple calculation please
- Anonymous2 years ago
Hi mcarangelo ,
Thanks for the reply from Anand24 .
Maybe you can try to convert Direct Query mode to Import mode.
On the status bar bottom right corner, there's a text that reads "Direct Query: On (Click Here To Change)", if you click that and pick Import, your model should start importing.
Note that this is currently a one way trip. i.e., an Import Model cannot be converted back to DirectQuery.
After I established the relationship between the two tables, it worked normally.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf 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!
Hi mcarangelo ,
Thanks for the reply from Greg_Deckler .
This is sample data that I created myself:
|
SalesA |
SalesB |
|
100 |
80 |
|
200 |
90 |
|
300 |
110 |
|
400 |
280 |
|
500 |
340 |
Create a measure:
Measure = MAX('Table'[SalesA]) - MAX('Table'[SalesB])
The page effect is as follows:
The pbix file is attached.
You can share an image or file by uploading it to a cloud storage service (e.g. OneDrive, Google Drive) and sharing the link.
Please do not log in to your account in Power BI Desktop when uploading pbix files.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
If you have any other questions please feel free to contact me.
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!
The fields are in (2) different tables. Would I use the 'measures' option?
- Anand242 years agoSuper User
Measure would be ideal since you are using fields from 2 separate tables. Even if it was from a single table, measure would be ideal since it doesn't increase data model size.
One important point is that both your tables should have a relationship between them.
Can you attach a screenshot of your model view? Also, it will be great if you have sample data for both the tables.Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
- mcarangelo2 years agoFrequent Visitor
Will using 'measure' result in a new column with the calculation result? I attached a screenshot of the model with the fields highlighted in yellow.
- mcarangelo2 years agoFrequent Visitor
- mcarangelo2 years agoFrequent Visitor
Here is a view of the report. The fields in yellow require the calculation with the result expected in green. Also, do the fields in blue require the same values in order for this formula to work?
- Anonymous2 years agoNot applicable
Hi mcarangelo ,
Thanks for the reply from Anand24 .
Maybe you can try to convert Direct Query mode to Import mode.
On the status bar bottom right corner, there's a text that reads "Direct Query: On (Click Here To Change)", if you click that and pick Import, your model should start importing.
Note that this is currently a one way trip. i.e., an Import Model cannot be converted back to DirectQuery.
After I established the relationship between the two tables, it worked normally.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf 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!- mcarangelo2 years agoFrequent Visitor
Hello - Converting to import mode unfortunately is not an option. The report is connected to a Snowflake database.