Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I hope everyone is doing well.
I am generating two random numbers as follows:
Measure1 = var a = Calculate(Rand()*10) return a
Measure2 = var b = Calculate(Rand()*20) return b
whenever i try to subtract these numbers e.g.
Measure3 = Measure1 - Measure2
or
Measure3 = var c =Calculate(Measure1 - Measure2) return c
It doesnot give me the right answer.
Please help
Solved! Go to Solution.
@Anonymous
Since you use RAND function, it always generates a new number at the time computation. It doesn't store the values and its not static.
Let me know what you are trying to achieve.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @AllisonKennedy ,
Yeah, I am trying to do whatif analysis but on random values. It is not producing the right results.
As you can see the result(EBIT0) is not correct.
Formula:
EBIT0 = [Vdp0_rand]-[Cons0_rand]-[Cserv0_rand]-[Clav0_rand]-[Gbt0_rand]-[Amm0_rand]
Hi @Anonymous ,
If you make sense, can you please accept the helpful answers as solution? Others who have the same questions will find answers esily and quickly. They will benefit from your thread. 😉
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous
Since you use RAND function, it always generates a new number at the time computation. It doesn't store the values and its not static.
Let me know what you are trying to achieve.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |