Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I created the calculate DAX as the picture below, and the result is everyday 100%, which 100% should be the total of the whole week.
Can anyone point out what's wrong with my code? Thank you.
Solved! Go to Solution.
Hi Dino, thank you for your response. It seems that I cannot upload PowerBI up here, so I wonder how to share this file.
Anyhow, this is my relationship tables:
Sum of Visitors = SUM('Daily Visits 2024'[Visitors]
I also create other measures (in total I have 28 measures), such as the Year-over-year that I created after this measure of percentage of total with this syntax:
I wonder if my measure Percentage of Total is not working because of this Year-over-year measure that is created afterwards. Thank you
Hi @ale259 ,
Thanks for bhanu_gautam's reply!
The information you provided is too little. It is unlikely that we can accurately identify the problem based on the existing information.
After testing, there should be no problem with the DAX you provided (if you only have one table):
The problem should be in your data model or in your measure [SumofVisitors]. Please provide sample data of all the data tables involved, the relationship between the tables, and the DAX used by measure [SumofVisitors] (you can replace your actual data with the test data). Thank you!
Best Regards,
Dino Tao
Hi Dino, thank you for your response. It seems that I cannot upload PowerBI up here, so I wonder how to share this file.
Anyhow, this is my relationship tables:
Sum of Visitors = SUM('Daily Visits 2024'[Visitors]
I also create other measures (in total I have 28 measures), such as the Year-over-year that I created after this measure of percentage of total with this syntax:
I wonder if my measure Percentage of Total is not working because of this Year-over-year measure that is created afterwards. Thank you
@ale259 Try using
DAX
PercentOfAllVisitors =
VAR TotalSumVisitors = SUM('Daily Visits 2024'[SumofVisitors])
VAR GrandTotalVisitors = CALCULATE(SUM('Daily Visits 2024'[SumofVisitors]), ALL('Daily Visits 2024'))
RETURN DIVIDE(TotalSumVisitors, GrandTotalVisitors)
Proud to be a Super User! |
|
Yes I used that and it's now working. Tu.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |