Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
nuuomkt
Frequent Visitor

Date slicer can't change value

Hi all, 

 

I try to calculate the number of repurchase customers. The sample table is as follows:

 

IDdate.rep
C1 
C27/1
C3 
C47/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.

 

擷取.PNG

 

However, after I applied the date.rep slicer, The result of the n.rep value and the ID(count) didn't match.

 

擷取2.PNG

 

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

2 ACCEPTED SOLUTIONS

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

View solution in original post

nuuomkt
Frequent Visitor

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

 

View solution in original post

3 REPLIES 3
nuuomkt
Frequent Visitor

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

 

v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.