Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I try to calculate the number of repurchase customers. The sample table is as follows:
ID | date.rep |
C1 | |
C2 | 7/1 |
C3 | |
C4 | 7/3 |
The column has the record of repurchase date only when a customer makes a second purchase. So I created a value like this:
n.rep = calculate(
distinctcount('table'[ID]),
not(isblank('table'[date.rep])
))
I double-checked the result and found that the n.rep matched the ID(count), indicating this approach worked.
However, after I applied the date.rep slicer, The result of the n.rep value and the ID(count) didn't match.
I am really confused about this outcome. I need the value n.rep in other tables, so I want to know what makes these two values different. What should I do to correct this formula?
Thank you very much for answering!
Bryan
Solved! Go to Solution.
Hi @v-shex-msft ,
Thank you for the reply! Yes I'm still confused with it because I'm using the measure, but I just can't get the right result.
As you suggested, I create a sample data and a simulated PowerBI file. Please check in this google drive linke:
https://drive.google.com/drive/folders/13ZmD6VJLswaB1jKaVfGa7uFWmRJCxi__?usp=sharing
My goal is to make the result of the n.rep measure equal to that of ID(count), so I can be sure that the measure works correctly and use it in other tables.
Please help me find out which part goes wrong!
Many thanks,
Bryan
Hi everyone,
I just discovered the answer to the problem, so I recorded in here.
Thanks to the post : Blank or null value,
https://community.powerbi.com/t5/Desktop/Blank-or-null-value/td-p/775616
I realized that the blank columns in the table are actually not the blank value but the null value.
Since my formula used blank( ), so the measure didn't interact with the filter.
Thanks again to the community!
Cheers,
Bryan
Hi everyone,
I just discovered the answer to the problem, so I recorded in here.
Thanks to the post : Blank or null value,
https://community.powerbi.com/t5/Desktop/Blank-or-null-value/td-p/775616
I realized that the blank columns in the table are actually not the blank value but the null value.
Since my formula used blank( ), so the measure didn't interact with the filter.
Thanks again to the community!
Cheers,
Bryan
HI @nuuomkt,
Current power bi does not support to create dynamic calculate column/table based on filter/slicer, please use measure formula to instead.
If you still confused about coding formula, can you please share some sample data for testing?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @v-shex-msft ,
Thank you for the reply! Yes I'm still confused with it because I'm using the measure, but I just can't get the right result.
As you suggested, I create a sample data and a simulated PowerBI file. Please check in this google drive linke:
https://drive.google.com/drive/folders/13ZmD6VJLswaB1jKaVfGa7uFWmRJCxi__?usp=sharing
My goal is to make the result of the n.rep measure equal to that of ID(count), so I can be sure that the measure works correctly and use it in other tables.
Please help me find out which part goes wrong!
Many thanks,
Bryan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |